From 106d029eacd05fc890dffd1169a19d4596d93c54 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 20 Sep 2024 15:00:59 -0700 Subject: [PATCH] feat: [dlp] action for publishing data profiles to SecOps (formelly known as Chronicle) (#5691) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: action for publishing data profiles to SecOps (formelly known as Chronicle) feat: action for publishing data profiles to Security Command Center feat: discovery configs for AWS S3 buckets docs: small improvements and clarifications PiperOrigin-RevId: 676184918 Source-Link: https://github.com/googleapis/googleapis/commit/607c2ae82620153880a66898bcbf0a46d38d7d10 Source-Link: https://github.com/googleapis/googleapis-gen/commit/f92f1ae19895930aca6ad11aaeb1d4d9cd7a61a1 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLXByaXZhY3ktZGxwLy5Pd2xCb3QueWFtbCIsImgiOiJmOTJmMWFlMTk4OTU5MzBhY2E2YWQxMWFhZWIxZDRkOWNkN2E2MWExIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../protos/google/privacy/dlp/v2/dlp.proto | 270 +- .../google-privacy-dlp/protos/protos.d.ts | 1870 +- packages/google-privacy-dlp/protos/protos.js | 17527 ++++++++++------ .../google-privacy-dlp/protos/protos.json | 319 +- ...p_service.list_file_store_data_profiles.js | 1 + ...nippet_metadata_google.privacy.dlp.v2.json | 2 +- .../src/v2/dlp_service_client.ts | 3 + 7 files changed, 13333 insertions(+), 6659 deletions(-) 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 6f48b9f05b9..64a69fb2546 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 @@ -4897,6 +4897,12 @@ message DataProfileAction { ERROR_CHANGED = 4; } + // Message expressing intention to publish to Google Security Operations. + message PublishToChronicle {} + + // If set, a summary finding will be created/updated in SCC for each profile. + message PublishToSecurityCommandCenter {} + // If set, attaches the [tags] // (https://cloud.google.com/resource-manager/docs/tags/tags-overview) // provided to profiled resources. Tags support [access @@ -4959,6 +4965,15 @@ message DataProfileAction { // Publish a message into the Pub/Sub topic. PubSubNotification pub_sub_notification = 2; + // Publishes generated data profiles to Google Security Operations. + // For more information, see [Use Sensitive Data Protection data in + // context-aware + // analytics](https://cloud.google.com/chronicle/docs/detection/usecase-dlp-high-risk-user-download). + PublishToChronicle publish_to_chronicle = 3; + + // Publishes findings to SCC for each data profile. + PublishToSecurityCommandCenter publish_to_scc = 4; + // Tags the profiled resources with the specified tag values. TagResources tag_resources = 8; } @@ -4980,6 +4995,9 @@ message DataProfileJobConfig { // that are profiled, and the Cloud DLP API must be enabled. string project_id = 5; + // Must be set only when scanning other clouds. + OtherCloudDiscoveryStartingLocation other_cloud_starting_location = 8; + // Detection logic for profile generation. // // Not all template features are used by profiles. FindingLimits, @@ -5144,6 +5162,9 @@ message DiscoveryConfig { // Only set when the parent is an org. OrgConfig org_config = 2; + // Must be set only when scanning other clouds. + OtherCloudDiscoveryStartingLocation other_cloud_starting_location = 12; + // Detection logic for profile generation. // // Not all template features are used by Discovery. FindingLimits, @@ -5210,6 +5231,10 @@ message DiscoveryTarget { // Cloud Storage target for Discovery. The first target to match a table // will be the one applied. CloudStorageDiscoveryTarget cloud_storage_target = 4; + + // Other clouds target for discovery. The first target to match a resource + // will be the one applied. + OtherCloudDiscoveryTarget other_cloud_target = 5; } } @@ -5821,6 +5846,208 @@ message DiscoveryFileStoreConditions { } } +// Target used to match against for discovery of resources from other clouds. +// An [AWS connector in Security Command Center +// (Enterprise](https://cloud.google.com/security-command-center/docs/connect-scc-to-aws) +// is required to use this feature. +message OtherCloudDiscoveryTarget { + // Required. The type of data profiles generated by this discovery target. + // Supported values are: + // * aws/s3/bucket + DataSourceType data_source_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resources that the discovery cadence applies to. The + // first target with a matching filter will be the one to apply to a resource. + DiscoveryOtherCloudFilter filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. In addition to matching the filter, these conditions must be true + // before a profile is generated. + DiscoveryOtherCloudConditions conditions = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Type of cadence. + oneof cadence { + // How often and when to update data profiles. New resources that match both + // the filter and conditions are scanned as quickly as possible depending on + // system capacity. + DiscoveryOtherCloudGenerationCadence generation_cadence = 4; + + // Disable profiling for resources that match this filter. + Disabled disabled = 5; + } +} + +// Determines which resources from the other cloud will have profiles generated. +// Includes the ability to filter by resource names. +message DiscoveryOtherCloudFilter { + // Whether the filter applies to a specific set of resources or all + // other resources. The first filter to match will be applied, regardless of + // the condition. Defaults to `others` if none is set. + oneof filter { + // A collection of resources for this filter to apply to. + OtherCloudResourceCollection collection = 1; + + // The resource to scan. Configs using this filter can only have one target + // (the target with this single resource reference). + OtherCloudSingleResourceReference single_resource = 2; + + // Optional. Catch-all. This should always be the last target in the list + // because anything above it will apply first. Should only appear once in a + // configuration. If none is specified, a default one will be added + // automatically. + AllOtherResources others = 100 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Match resources using regex filters. +message OtherCloudResourceCollection { + // The first filter containing a pattern that matches a resource will be used. + oneof pattern { + // A collection of regular expressions to match a resource against. + OtherCloudResourceRegexes include_regexes = 1; + } +} + +// A collection of regular expressions to determine what resources to match +// against. +message OtherCloudResourceRegexes { + // A group of regular expression patterns to match against one or more + // resources. + // Maximum of 100 entries. The sum of all regular expression's length can't + // exceed 10 KiB. + repeated OtherCloudResourceRegex patterns = 1; +} + +// A pattern to match against one or more resources. At least one pattern must +// be specified. Regular expressions use RE2 +// [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found +// under the google/re2 repository on GitHub. +message OtherCloudResourceRegex { + // The type of resource regex to use. + oneof resource_regex { + // Regex for Amazon S3 buckets. + AmazonS3BucketRegex amazon_s3_bucket_regex = 1; + } +} + +// AWS account regex. +message AwsAccountRegex { + // Optional. Regex to test the AWS account ID against. + // If empty, all accounts match. + string account_id_regex = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Amazon S3 bucket regex. +message AmazonS3BucketRegex { + // The AWS account regex. + AwsAccountRegex aws_account_regex = 1; + + // Optional. Regex to test the bucket name against. + // If empty, all buckets match. + string bucket_name_regex = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Identifies a single resource, like a single Amazon S3 bucket. +message OtherCloudSingleResourceReference { + // The resource to scan. + oneof resource { + // Amazon S3 bucket. + AmazonS3Bucket amazon_s3_bucket = 1; + } +} + +// AWS account. +message AwsAccount { + // Required. AWS account ID. + string account_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Amazon S3 bucket. +message AmazonS3Bucket { + // The AWS account. + AwsAccount aws_account = 1; + + // Required. The bucket name. + string bucket_name = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Requirements that must be true before a resource is profiled for the first +// time. +message DiscoveryOtherCloudConditions { + // Minimum age a resource must be before Cloud DLP can profile it. Value must + // be 1 hour or greater. + google.protobuf.Duration min_age = 1; + + // The conditions to apply. + oneof conditions { + // Amazon S3 bucket conditions. + AmazonS3BucketConditions amazon_s3_bucket_conditions = 2; + } +} + +// Amazon S3 bucket conditions. +message AmazonS3BucketConditions { + // Supported Amazon S3 bucket types. + // Defaults to TYPE_ALL_SUPPORTED. + enum BucketType { + // Unused. + TYPE_UNSPECIFIED = 0; + + // All supported classes. + TYPE_ALL_SUPPORTED = 1; + + // A general purpose Amazon S3 bucket. + TYPE_GENERAL_PURPOSE = 2; + } + + // Supported Amazon S3 object storage classes. + // Defaults to ALL_SUPPORTED_CLASSES. + enum ObjectStorageClass { + // Unused. + UNSPECIFIED = 0; + + // All supported classes. + ALL_SUPPORTED_CLASSES = 1; + + // Standard object class. + STANDARD = 2; + + // Standard - infrequent access object class. + STANDARD_INFREQUENT_ACCESS = 4; + + // Glacier - instant retrieval object class. + GLACIER_INSTANT_RETRIEVAL = 6; + + // Objects in the S3 Intelligent-Tiering access tiers. + INTELLIGENT_TIERING = 7; + } + + // Optional. Bucket types that should be profiled. + // Optional. Defaults to TYPE_ALL_SUPPORTED if unspecified. + repeated BucketType bucket_types = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Object classes that should be profiled. + // Optional. Defaults to ALL_SUPPORTED_CLASSES if unspecified. + repeated ObjectStorageClass object_storage_classes = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// How often existing resources should have their profiles refreshed. +// New resources are scanned as quickly as possible depending on system +// capacity. +message DiscoveryOtherCloudGenerationCadence { + // Optional. Frequency to update profiles regardless of whether the underlying + // resource has changes. Defaults to never. + DataProfileUpdateFrequency refresh_frequency = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Governs when to update data profiles when the inspection rules + // defined by the `InspectTemplate` change. + // If not set, changing the template will not cause a data profile to update. + DiscoveryInspectTemplateModifiedCadence inspect_template_modified_cadence = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + // The location to begin a discovery scan. Denotes an organization ID or folder // ID within an organization. message DiscoveryStartingLocation { @@ -5834,6 +6061,31 @@ message DiscoveryStartingLocation { } } +// The other cloud starting location for discovery. +message OtherCloudDiscoveryStartingLocation { + // The AWS starting location for discovery. + message AwsDiscoveryStartingLocation { + // The scope of this starting location. + oneof scope { + // The AWS account ID that this discovery config applies to. + // Within an AWS organization, you can find the AWS account ID inside an + // AWS account ARN. Example: + // arn:{partition}:organizations::{management_account_id}:account/{org_id}/{account_id} + string account_id = 2; + + // All AWS assets stored in Asset Inventory that didn't match other AWS + // discovery configs. + bool all_asset_inventory_assets = 3; + } + } + + // The other cloud starting location for discovery. + oneof location { + // The AWS starting location for discovery. + AwsDiscoveryStartingLocation aws_location = 1; + } +} + // Match discovery resources not covered by any other filter. message AllOtherResources {} @@ -6946,7 +7198,7 @@ message ProjectDataProfile { // The resource name of the profile. string name = 1; - // Project ID that was profiled. + // Project ID or account that was profiled. string project_id = 2; // The last time the profile was generated. @@ -7364,6 +7616,7 @@ message ColumnDataProfile { // The profile for a file store. // // * Cloud Storage: maps 1:1 with a bucket. +// * Amazon S3: maps 1:1 with a bucket. message FileStoreDataProfile { option (google.api.resource) = { type: "dlp.googleapis.com/FileStoreDataProfile" @@ -7396,12 +7649,15 @@ message FileStoreDataProfile { string project_data_profile = 3; // The Google Cloud project ID that owns the resource. + // For Amazon S3 buckets, this is the AWS Account Id. string project_id = 4; // The location of the file store. // // * Cloud Storage: // https://cloud.google.com/storage/docs/locations#available-locations + // * Amazon S3: + // https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints string file_store_location = 5; // For resources that have multiple storage locations, these are those @@ -7419,10 +7675,14 @@ message FileStoreDataProfile { // The file store path. // // * Cloud Storage: `gs://{bucket}` + // * Amazon S3: `s3://{bucket}` string file_store_path = 6; // The resource name of the resource profiled. // https://cloud.google.com/apis/design/resource_names#full_resource_name + // + // Example format of an S3 bucket full resource name: + // `//cloudasset.googleapis.com/organizations/{org_id}/otherCloudConnections/aws/arn:aws:s3:::{bucket_name}` string full_resource = 24; // The snapshot of the configurations used to generate the profile. @@ -7599,6 +7859,7 @@ message ListFileStoreDataProfilesRequest { // * A restriction has the form of `{field} {operator} {value}`. // * Supported fields/values: // - `project_id` - The Google Cloud project ID. + // - `account_id` - The AWS account ID. // - `file_store_path` - The path like "gs://bucket". // - `data_source_type` - The profile's data source type, like // "google/storage/bucket". @@ -7995,7 +8256,12 @@ message DeleteTableDataProfileRequest { // Message used to identify the type of resource being profiled. message DataSourceType { // Output only. An identifying string to the type of resource being profiled. - // Current values: google/bigquery/table, google/project + // Current values: + // + // * google/bigquery/table + // * google/project + // * google/sql/table + // * google/gcs/bucket string data_source = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } diff --git a/packages/google-privacy-dlp/protos/protos.d.ts b/packages/google-privacy-dlp/protos/protos.d.ts index 0e1113cac4b..0b13f79f536 100644 --- a/packages/google-privacy-dlp/protos/protos.d.ts +++ b/packages/google-privacy-dlp/protos/protos.d.ts @@ -20111,6 +20111,12 @@ export namespace google { /** DataProfileAction pubSubNotification */ pubSubNotification?: (google.privacy.dlp.v2.DataProfileAction.IPubSubNotification|null); + /** DataProfileAction publishToChronicle */ + publishToChronicle?: (google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null); + + /** DataProfileAction publishToScc */ + publishToScc?: (google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null); + /** DataProfileAction tagResources */ tagResources?: (google.privacy.dlp.v2.DataProfileAction.ITagResources|null); } @@ -20130,11 +20136,17 @@ export namespace google { /** DataProfileAction pubSubNotification. */ public pubSubNotification?: (google.privacy.dlp.v2.DataProfileAction.IPubSubNotification|null); + /** DataProfileAction publishToChronicle. */ + public publishToChronicle?: (google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null); + + /** DataProfileAction publishToScc. */ + public publishToScc?: (google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null); + /** DataProfileAction tagResources. */ public tagResources?: (google.privacy.dlp.v2.DataProfileAction.ITagResources|null); /** DataProfileAction action. */ - public action?: ("exportData"|"pubSubNotification"|"tagResources"); + public action?: ("exportData"|"pubSubNotification"|"publishToChronicle"|"publishToScc"|"tagResources"); /** * Creates a new DataProfileAction instance using the specified properties. @@ -20448,6 +20460,188 @@ export namespace google { ERROR_CHANGED = 4 } + /** Properties of a PublishToChronicle. */ + interface IPublishToChronicle { + } + + /** Represents a PublishToChronicle. */ + class PublishToChronicle implements IPublishToChronicle { + + /** + * Constructs a new PublishToChronicle. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle); + + /** + * Creates a new PublishToChronicle instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishToChronicle instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle): google.privacy.dlp.v2.DataProfileAction.PublishToChronicle; + + /** + * Encodes the specified PublishToChronicle message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify|verify} messages. + * @param message PublishToChronicle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishToChronicle message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify|verify} messages. + * @param message PublishToChronicle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishToChronicle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishToChronicle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.PublishToChronicle; + + /** + * Decodes a PublishToChronicle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishToChronicle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.PublishToChronicle; + + /** + * Verifies a PublishToChronicle 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 PublishToChronicle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishToChronicle + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.PublishToChronicle; + + /** + * Creates a plain object from a PublishToChronicle message. Also converts values to other types if specified. + * @param message PublishToChronicle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.PublishToChronicle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishToChronicle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishToChronicle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishToSecurityCommandCenter. */ + interface IPublishToSecurityCommandCenter { + } + + /** Represents a PublishToSecurityCommandCenter. */ + class PublishToSecurityCommandCenter implements IPublishToSecurityCommandCenter { + + /** + * Constructs a new PublishToSecurityCommandCenter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter); + + /** + * Creates a new PublishToSecurityCommandCenter instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishToSecurityCommandCenter instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter): google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter; + + /** + * Encodes the specified PublishToSecurityCommandCenter message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify|verify} messages. + * @param message PublishToSecurityCommandCenter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishToSecurityCommandCenter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify|verify} messages. + * @param message PublishToSecurityCommandCenter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishToSecurityCommandCenter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishToSecurityCommandCenter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter; + + /** + * Decodes a PublishToSecurityCommandCenter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishToSecurityCommandCenter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter; + + /** + * Verifies a PublishToSecurityCommandCenter 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 PublishToSecurityCommandCenter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishToSecurityCommandCenter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter; + + /** + * Creates a plain object from a PublishToSecurityCommandCenter message. Also converts values to other types if specified. + * @param message PublishToSecurityCommandCenter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishToSecurityCommandCenter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishToSecurityCommandCenter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a TagResources. */ interface ITagResources { @@ -20776,6 +20970,9 @@ export namespace google { /** DataProfileJobConfig projectId */ projectId?: (string|null); + /** DataProfileJobConfig otherCloudStartingLocation */ + otherCloudStartingLocation?: (google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null); + /** DataProfileJobConfig inspectTemplates */ inspectTemplates?: (string[]|null); @@ -20798,6 +20995,9 @@ export namespace google { /** DataProfileJobConfig projectId. */ public projectId: string; + /** DataProfileJobConfig otherCloudStartingLocation. */ + public otherCloudStartingLocation?: (google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null); + /** DataProfileJobConfig inspectTemplates. */ public inspectTemplates: string[]; @@ -21416,6 +21616,9 @@ export namespace google { /** DiscoveryConfig orgConfig */ orgConfig?: (google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null); + /** DiscoveryConfig otherCloudStartingLocation */ + otherCloudStartingLocation?: (google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null); + /** DiscoveryConfig inspectTemplates */ inspectTemplates?: (string[]|null); @@ -21459,6 +21662,9 @@ export namespace google { /** DiscoveryConfig orgConfig. */ public orgConfig?: (google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null); + /** DiscoveryConfig otherCloudStartingLocation. */ + public otherCloudStartingLocation?: (google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null); + /** DiscoveryConfig inspectTemplates. */ public inspectTemplates: string[]; @@ -21688,6 +21894,9 @@ export namespace google { /** DiscoveryTarget cloudStorageTarget */ cloudStorageTarget?: (google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null); + + /** DiscoveryTarget otherCloudTarget */ + otherCloudTarget?: (google.privacy.dlp.v2.IOtherCloudDiscoveryTarget|null); } /** Represents a DiscoveryTarget. */ @@ -21711,8 +21920,11 @@ export namespace google { /** DiscoveryTarget cloudStorageTarget. */ public cloudStorageTarget?: (google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null); + /** DiscoveryTarget otherCloudTarget. */ + public otherCloudTarget?: (google.privacy.dlp.v2.IOtherCloudDiscoveryTarget|null); + /** DiscoveryTarget target. */ - public target?: ("bigQueryTarget"|"cloudSqlTarget"|"secretsTarget"|"cloudStorageTarget"); + public target?: ("bigQueryTarget"|"cloudSqlTarget"|"secretsTarget"|"cloudStorageTarget"|"otherCloudTarget"); /** * Creates a new DiscoveryTarget instance using the specified properties. @@ -25131,112 +25343,1686 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DiscoveryStartingLocation. */ - interface IDiscoveryStartingLocation { + /** Properties of an OtherCloudDiscoveryTarget. */ + interface IOtherCloudDiscoveryTarget { - /** DiscoveryStartingLocation organizationId */ - organizationId?: (number|Long|string|null); + /** OtherCloudDiscoveryTarget dataSourceType */ + dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); - /** DiscoveryStartingLocation folderId */ - folderId?: (number|Long|string|null); + /** OtherCloudDiscoveryTarget filter */ + filter?: (google.privacy.dlp.v2.IDiscoveryOtherCloudFilter|null); + + /** OtherCloudDiscoveryTarget conditions */ + conditions?: (google.privacy.dlp.v2.IDiscoveryOtherCloudConditions|null); + + /** OtherCloudDiscoveryTarget generationCadence */ + generationCadence?: (google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence|null); + + /** OtherCloudDiscoveryTarget disabled */ + disabled?: (google.privacy.dlp.v2.IDisabled|null); } - /** Represents a DiscoveryStartingLocation. */ - class DiscoveryStartingLocation implements IDiscoveryStartingLocation { + /** Represents an OtherCloudDiscoveryTarget. */ + class OtherCloudDiscoveryTarget implements IOtherCloudDiscoveryTarget { /** - * Constructs a new DiscoveryStartingLocation. + * Constructs a new OtherCloudDiscoveryTarget. * @param [properties] Properties to set */ - constructor(properties?: google.privacy.dlp.v2.IDiscoveryStartingLocation); + constructor(properties?: google.privacy.dlp.v2.IOtherCloudDiscoveryTarget); - /** DiscoveryStartingLocation organizationId. */ - public organizationId?: (number|Long|string|null); + /** OtherCloudDiscoveryTarget dataSourceType. */ + public dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); - /** DiscoveryStartingLocation folderId. */ - public folderId?: (number|Long|string|null); + /** OtherCloudDiscoveryTarget filter. */ + public filter?: (google.privacy.dlp.v2.IDiscoveryOtherCloudFilter|null); - /** DiscoveryStartingLocation location. */ - public location?: ("organizationId"|"folderId"); + /** OtherCloudDiscoveryTarget conditions. */ + public conditions?: (google.privacy.dlp.v2.IDiscoveryOtherCloudConditions|null); + + /** OtherCloudDiscoveryTarget generationCadence. */ + public generationCadence?: (google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence|null); + + /** OtherCloudDiscoveryTarget disabled. */ + public disabled?: (google.privacy.dlp.v2.IDisabled|null); + + /** OtherCloudDiscoveryTarget cadence. */ + public cadence?: ("generationCadence"|"disabled"); /** - * Creates a new DiscoveryStartingLocation instance using the specified properties. + * Creates a new OtherCloudDiscoveryTarget instance using the specified properties. * @param [properties] Properties to set - * @returns DiscoveryStartingLocation instance + * @returns OtherCloudDiscoveryTarget instance */ - public static create(properties?: google.privacy.dlp.v2.IDiscoveryStartingLocation): google.privacy.dlp.v2.DiscoveryStartingLocation; + public static create(properties?: google.privacy.dlp.v2.IOtherCloudDiscoveryTarget): google.privacy.dlp.v2.OtherCloudDiscoveryTarget; /** - * Encodes the specified DiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. - * @param message DiscoveryStartingLocation message or plain object to encode + * Encodes the specified OtherCloudDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify|verify} messages. + * @param message OtherCloudDiscoveryTarget message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.privacy.dlp.v2.IDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.privacy.dlp.v2.IOtherCloudDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. - * @param message DiscoveryStartingLocation message or plain object to encode + * Encodes the specified OtherCloudDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify|verify} messages. + * @param message OtherCloudDiscoveryTarget message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DiscoveryStartingLocation message from the specified reader or buffer. + * Decodes an OtherCloudDiscoveryTarget message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DiscoveryStartingLocation + * @returns OtherCloudDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryStartingLocation; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudDiscoveryTarget; /** - * Decodes a DiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * Decodes an OtherCloudDiscoveryTarget message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DiscoveryStartingLocation + * @returns OtherCloudDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryStartingLocation; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudDiscoveryTarget; /** - * Verifies a DiscoveryStartingLocation message. + * Verifies an OtherCloudDiscoveryTarget 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 DiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * Creates an OtherCloudDiscoveryTarget message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DiscoveryStartingLocation + * @returns OtherCloudDiscoveryTarget */ - public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryStartingLocation; + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudDiscoveryTarget; /** - * Creates a plain object from a DiscoveryStartingLocation message. Also converts values to other types if specified. - * @param message DiscoveryStartingLocation + * Creates a plain object from an OtherCloudDiscoveryTarget message. Also converts values to other types if specified. + * @param message OtherCloudDiscoveryTarget * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.privacy.dlp.v2.DiscoveryStartingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.privacy.dlp.v2.OtherCloudDiscoveryTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DiscoveryStartingLocation to JSON. + * Converts this OtherCloudDiscoveryTarget to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DiscoveryStartingLocation + * Gets the default type url for OtherCloudDiscoveryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryOtherCloudFilter. */ + interface IDiscoveryOtherCloudFilter { + + /** DiscoveryOtherCloudFilter collection */ + collection?: (google.privacy.dlp.v2.IOtherCloudResourceCollection|null); + + /** DiscoveryOtherCloudFilter singleResource */ + singleResource?: (google.privacy.dlp.v2.IOtherCloudSingleResourceReference|null); + + /** DiscoveryOtherCloudFilter others */ + others?: (google.privacy.dlp.v2.IAllOtherResources|null); + } + + /** Represents a DiscoveryOtherCloudFilter. */ + class DiscoveryOtherCloudFilter implements IDiscoveryOtherCloudFilter { + + /** + * Constructs a new DiscoveryOtherCloudFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudFilter); + + /** DiscoveryOtherCloudFilter collection. */ + public collection?: (google.privacy.dlp.v2.IOtherCloudResourceCollection|null); + + /** DiscoveryOtherCloudFilter singleResource. */ + public singleResource?: (google.privacy.dlp.v2.IOtherCloudSingleResourceReference|null); + + /** DiscoveryOtherCloudFilter others. */ + public others?: (google.privacy.dlp.v2.IAllOtherResources|null); + + /** DiscoveryOtherCloudFilter filter. */ + public filter?: ("collection"|"singleResource"|"others"); + + /** + * Creates a new DiscoveryOtherCloudFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryOtherCloudFilter instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudFilter): google.privacy.dlp.v2.DiscoveryOtherCloudFilter; + + /** + * Encodes the specified DiscoveryOtherCloudFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify|verify} messages. + * @param message DiscoveryOtherCloudFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryOtherCloudFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryOtherCloudFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify|verify} messages. + * @param message DiscoveryOtherCloudFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryOtherCloudFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryOtherCloudFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryOtherCloudFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryOtherCloudFilter; + + /** + * Decodes a DiscoveryOtherCloudFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryOtherCloudFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryOtherCloudFilter; + + /** + * Verifies a DiscoveryOtherCloudFilter 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 DiscoveryOtherCloudFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryOtherCloudFilter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryOtherCloudFilter; + + /** + * Creates a plain object from a DiscoveryOtherCloudFilter message. Also converts values to other types if specified. + * @param message DiscoveryOtherCloudFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryOtherCloudFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryOtherCloudFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryOtherCloudFilter * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an OtherCloudResourceCollection. */ + interface IOtherCloudResourceCollection { + + /** OtherCloudResourceCollection includeRegexes */ + includeRegexes?: (google.privacy.dlp.v2.IOtherCloudResourceRegexes|null); + } + + /** Represents an OtherCloudResourceCollection. */ + class OtherCloudResourceCollection implements IOtherCloudResourceCollection { + + /** + * Constructs a new OtherCloudResourceCollection. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudResourceCollection); + + /** OtherCloudResourceCollection includeRegexes. */ + public includeRegexes?: (google.privacy.dlp.v2.IOtherCloudResourceRegexes|null); + + /** OtherCloudResourceCollection pattern. */ + public pattern?: "includeRegexes"; + + /** + * Creates a new OtherCloudResourceCollection instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudResourceCollection instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudResourceCollection): google.privacy.dlp.v2.OtherCloudResourceCollection; + + /** + * Encodes the specified OtherCloudResourceCollection message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceCollection.verify|verify} messages. + * @param message OtherCloudResourceCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudResourceCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudResourceCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceCollection.verify|verify} messages. + * @param message OtherCloudResourceCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudResourceCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudResourceCollection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudResourceCollection; + + /** + * Decodes an OtherCloudResourceCollection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudResourceCollection; + + /** + * Verifies an OtherCloudResourceCollection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudResourceCollection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudResourceCollection + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudResourceCollection; + + /** + * Creates a plain object from an OtherCloudResourceCollection message. Also converts values to other types if specified. + * @param message OtherCloudResourceCollection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudResourceCollection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudResourceCollection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudResourceCollection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudResourceRegexes. */ + interface IOtherCloudResourceRegexes { + + /** OtherCloudResourceRegexes patterns */ + patterns?: (google.privacy.dlp.v2.IOtherCloudResourceRegex[]|null); + } + + /** Represents an OtherCloudResourceRegexes. */ + class OtherCloudResourceRegexes implements IOtherCloudResourceRegexes { + + /** + * Constructs a new OtherCloudResourceRegexes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudResourceRegexes); + + /** OtherCloudResourceRegexes patterns. */ + public patterns: google.privacy.dlp.v2.IOtherCloudResourceRegex[]; + + /** + * Creates a new OtherCloudResourceRegexes instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudResourceRegexes instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudResourceRegexes): google.privacy.dlp.v2.OtherCloudResourceRegexes; + + /** + * Encodes the specified OtherCloudResourceRegexes message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegexes.verify|verify} messages. + * @param message OtherCloudResourceRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudResourceRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudResourceRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegexes.verify|verify} messages. + * @param message OtherCloudResourceRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudResourceRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudResourceRegexes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudResourceRegexes; + + /** + * Decodes an OtherCloudResourceRegexes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudResourceRegexes; + + /** + * Verifies an OtherCloudResourceRegexes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudResourceRegexes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudResourceRegexes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudResourceRegexes; + + /** + * Creates a plain object from an OtherCloudResourceRegexes message. Also converts values to other types if specified. + * @param message OtherCloudResourceRegexes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudResourceRegexes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudResourceRegexes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudResourceRegexes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudResourceRegex. */ + interface IOtherCloudResourceRegex { + + /** OtherCloudResourceRegex amazonS3BucketRegex */ + amazonS3BucketRegex?: (google.privacy.dlp.v2.IAmazonS3BucketRegex|null); + } + + /** Represents an OtherCloudResourceRegex. */ + class OtherCloudResourceRegex implements IOtherCloudResourceRegex { + + /** + * Constructs a new OtherCloudResourceRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudResourceRegex); + + /** OtherCloudResourceRegex amazonS3BucketRegex. */ + public amazonS3BucketRegex?: (google.privacy.dlp.v2.IAmazonS3BucketRegex|null); + + /** OtherCloudResourceRegex resourceRegex. */ + public resourceRegex?: "amazonS3BucketRegex"; + + /** + * Creates a new OtherCloudResourceRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudResourceRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudResourceRegex): google.privacy.dlp.v2.OtherCloudResourceRegex; + + /** + * Encodes the specified OtherCloudResourceRegex message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegex.verify|verify} messages. + * @param message OtherCloudResourceRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudResourceRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudResourceRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegex.verify|verify} messages. + * @param message OtherCloudResourceRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudResourceRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudResourceRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudResourceRegex; + + /** + * Decodes an OtherCloudResourceRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudResourceRegex; + + /** + * Verifies an OtherCloudResourceRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudResourceRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudResourceRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudResourceRegex; + + /** + * Creates a plain object from an OtherCloudResourceRegex message. Also converts values to other types if specified. + * @param message OtherCloudResourceRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudResourceRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudResourceRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudResourceRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsAccountRegex. */ + interface IAwsAccountRegex { + + /** AwsAccountRegex accountIdRegex */ + accountIdRegex?: (string|null); + } + + /** Represents an AwsAccountRegex. */ + class AwsAccountRegex implements IAwsAccountRegex { + + /** + * Constructs a new AwsAccountRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAwsAccountRegex); + + /** AwsAccountRegex accountIdRegex. */ + public accountIdRegex: string; + + /** + * Creates a new AwsAccountRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsAccountRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IAwsAccountRegex): google.privacy.dlp.v2.AwsAccountRegex; + + /** + * Encodes the specified AwsAccountRegex message. Does not implicitly {@link google.privacy.dlp.v2.AwsAccountRegex.verify|verify} messages. + * @param message AwsAccountRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAwsAccountRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsAccountRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AwsAccountRegex.verify|verify} messages. + * @param message AwsAccountRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAwsAccountRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsAccountRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsAccountRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AwsAccountRegex; + + /** + * Decodes an AwsAccountRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsAccountRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AwsAccountRegex; + + /** + * Verifies an AwsAccountRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AwsAccountRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsAccountRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AwsAccountRegex; + + /** + * Creates a plain object from an AwsAccountRegex message. Also converts values to other types if specified. + * @param message AwsAccountRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AwsAccountRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsAccountRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsAccountRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AmazonS3BucketRegex. */ + interface IAmazonS3BucketRegex { + + /** AmazonS3BucketRegex awsAccountRegex */ + awsAccountRegex?: (google.privacy.dlp.v2.IAwsAccountRegex|null); + + /** AmazonS3BucketRegex bucketNameRegex */ + bucketNameRegex?: (string|null); + } + + /** Represents an AmazonS3BucketRegex. */ + class AmazonS3BucketRegex implements IAmazonS3BucketRegex { + + /** + * Constructs a new AmazonS3BucketRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAmazonS3BucketRegex); + + /** AmazonS3BucketRegex awsAccountRegex. */ + public awsAccountRegex?: (google.privacy.dlp.v2.IAwsAccountRegex|null); + + /** AmazonS3BucketRegex bucketNameRegex. */ + public bucketNameRegex: string; + + /** + * Creates a new AmazonS3BucketRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns AmazonS3BucketRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IAmazonS3BucketRegex): google.privacy.dlp.v2.AmazonS3BucketRegex; + + /** + * Encodes the specified AmazonS3BucketRegex message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketRegex.verify|verify} messages. + * @param message AmazonS3BucketRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAmazonS3BucketRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AmazonS3BucketRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketRegex.verify|verify} messages. + * @param message AmazonS3BucketRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAmazonS3BucketRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AmazonS3BucketRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AmazonS3BucketRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AmazonS3BucketRegex; + + /** + * Decodes an AmazonS3BucketRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AmazonS3BucketRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AmazonS3BucketRegex; + + /** + * Verifies an AmazonS3BucketRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AmazonS3BucketRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AmazonS3BucketRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AmazonS3BucketRegex; + + /** + * Creates a plain object from an AmazonS3BucketRegex message. Also converts values to other types if specified. + * @param message AmazonS3BucketRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AmazonS3BucketRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AmazonS3BucketRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AmazonS3BucketRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudSingleResourceReference. */ + interface IOtherCloudSingleResourceReference { + + /** OtherCloudSingleResourceReference amazonS3Bucket */ + amazonS3Bucket?: (google.privacy.dlp.v2.IAmazonS3Bucket|null); + } + + /** Represents an OtherCloudSingleResourceReference. */ + class OtherCloudSingleResourceReference implements IOtherCloudSingleResourceReference { + + /** + * Constructs a new OtherCloudSingleResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudSingleResourceReference); + + /** OtherCloudSingleResourceReference amazonS3Bucket. */ + public amazonS3Bucket?: (google.privacy.dlp.v2.IAmazonS3Bucket|null); + + /** OtherCloudSingleResourceReference resource. */ + public resource?: "amazonS3Bucket"; + + /** + * Creates a new OtherCloudSingleResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudSingleResourceReference instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudSingleResourceReference): google.privacy.dlp.v2.OtherCloudSingleResourceReference; + + /** + * Encodes the specified OtherCloudSingleResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify|verify} messages. + * @param message OtherCloudSingleResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudSingleResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudSingleResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify|verify} messages. + * @param message OtherCloudSingleResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudSingleResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudSingleResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudSingleResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudSingleResourceReference; + + /** + * Decodes an OtherCloudSingleResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudSingleResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudSingleResourceReference; + + /** + * Verifies an OtherCloudSingleResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudSingleResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudSingleResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudSingleResourceReference; + + /** + * Creates a plain object from an OtherCloudSingleResourceReference message. Also converts values to other types if specified. + * @param message OtherCloudSingleResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudSingleResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudSingleResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudSingleResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsAccount. */ + interface IAwsAccount { + + /** AwsAccount accountId */ + accountId?: (string|null); + } + + /** Represents an AwsAccount. */ + class AwsAccount implements IAwsAccount { + + /** + * Constructs a new AwsAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAwsAccount); + + /** AwsAccount accountId. */ + public accountId: string; + + /** + * Creates a new AwsAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsAccount instance + */ + public static create(properties?: google.privacy.dlp.v2.IAwsAccount): google.privacy.dlp.v2.AwsAccount; + + /** + * Encodes the specified AwsAccount message. Does not implicitly {@link google.privacy.dlp.v2.AwsAccount.verify|verify} messages. + * @param message AwsAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAwsAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsAccount message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AwsAccount.verify|verify} messages. + * @param message AwsAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAwsAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AwsAccount; + + /** + * Decodes an AwsAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AwsAccount; + + /** + * Verifies an AwsAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AwsAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsAccount + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AwsAccount; + + /** + * Creates a plain object from an AwsAccount message. Also converts values to other types if specified. + * @param message AwsAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AwsAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AmazonS3Bucket. */ + interface IAmazonS3Bucket { + + /** AmazonS3Bucket awsAccount */ + awsAccount?: (google.privacy.dlp.v2.IAwsAccount|null); + + /** AmazonS3Bucket bucketName */ + bucketName?: (string|null); + } + + /** Represents an AmazonS3Bucket. */ + class AmazonS3Bucket implements IAmazonS3Bucket { + + /** + * Constructs a new AmazonS3Bucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAmazonS3Bucket); + + /** AmazonS3Bucket awsAccount. */ + public awsAccount?: (google.privacy.dlp.v2.IAwsAccount|null); + + /** AmazonS3Bucket bucketName. */ + public bucketName: string; + + /** + * Creates a new AmazonS3Bucket instance using the specified properties. + * @param [properties] Properties to set + * @returns AmazonS3Bucket instance + */ + public static create(properties?: google.privacy.dlp.v2.IAmazonS3Bucket): google.privacy.dlp.v2.AmazonS3Bucket; + + /** + * Encodes the specified AmazonS3Bucket message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3Bucket.verify|verify} messages. + * @param message AmazonS3Bucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAmazonS3Bucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AmazonS3Bucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3Bucket.verify|verify} messages. + * @param message AmazonS3Bucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAmazonS3Bucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AmazonS3Bucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AmazonS3Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AmazonS3Bucket; + + /** + * Decodes an AmazonS3Bucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AmazonS3Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AmazonS3Bucket; + + /** + * Verifies an AmazonS3Bucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AmazonS3Bucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AmazonS3Bucket + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AmazonS3Bucket; + + /** + * Creates a plain object from an AmazonS3Bucket message. Also converts values to other types if specified. + * @param message AmazonS3Bucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AmazonS3Bucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AmazonS3Bucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AmazonS3Bucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryOtherCloudConditions. */ + interface IDiscoveryOtherCloudConditions { + + /** DiscoveryOtherCloudConditions minAge */ + minAge?: (google.protobuf.IDuration|null); + + /** DiscoveryOtherCloudConditions amazonS3BucketConditions */ + amazonS3BucketConditions?: (google.privacy.dlp.v2.IAmazonS3BucketConditions|null); + } + + /** Represents a DiscoveryOtherCloudConditions. */ + class DiscoveryOtherCloudConditions implements IDiscoveryOtherCloudConditions { + + /** + * Constructs a new DiscoveryOtherCloudConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudConditions); + + /** DiscoveryOtherCloudConditions minAge. */ + public minAge?: (google.protobuf.IDuration|null); + + /** DiscoveryOtherCloudConditions amazonS3BucketConditions. */ + public amazonS3BucketConditions?: (google.privacy.dlp.v2.IAmazonS3BucketConditions|null); + + /** DiscoveryOtherCloudConditions conditions. */ + public conditions?: "amazonS3BucketConditions"; + + /** + * Creates a new DiscoveryOtherCloudConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryOtherCloudConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudConditions): google.privacy.dlp.v2.DiscoveryOtherCloudConditions; + + /** + * Encodes the specified DiscoveryOtherCloudConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify|verify} messages. + * @param message DiscoveryOtherCloudConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryOtherCloudConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryOtherCloudConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify|verify} messages. + * @param message DiscoveryOtherCloudConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryOtherCloudConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryOtherCloudConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryOtherCloudConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryOtherCloudConditions; + + /** + * Decodes a DiscoveryOtherCloudConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryOtherCloudConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryOtherCloudConditions; + + /** + * Verifies a DiscoveryOtherCloudConditions 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 DiscoveryOtherCloudConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryOtherCloudConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryOtherCloudConditions; + + /** + * Creates a plain object from a DiscoveryOtherCloudConditions message. Also converts values to other types if specified. + * @param message DiscoveryOtherCloudConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryOtherCloudConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryOtherCloudConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryOtherCloudConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AmazonS3BucketConditions. */ + interface IAmazonS3BucketConditions { + + /** AmazonS3BucketConditions bucketTypes */ + bucketTypes?: (google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType[]|null); + + /** AmazonS3BucketConditions objectStorageClasses */ + objectStorageClasses?: (google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass[]|null); + } + + /** Represents an AmazonS3BucketConditions. */ + class AmazonS3BucketConditions implements IAmazonS3BucketConditions { + + /** + * Constructs a new AmazonS3BucketConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAmazonS3BucketConditions); + + /** AmazonS3BucketConditions bucketTypes. */ + public bucketTypes: google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType[]; + + /** AmazonS3BucketConditions objectStorageClasses. */ + public objectStorageClasses: google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass[]; + + /** + * Creates a new AmazonS3BucketConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns AmazonS3BucketConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IAmazonS3BucketConditions): google.privacy.dlp.v2.AmazonS3BucketConditions; + + /** + * Encodes the specified AmazonS3BucketConditions message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketConditions.verify|verify} messages. + * @param message AmazonS3BucketConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAmazonS3BucketConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AmazonS3BucketConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketConditions.verify|verify} messages. + * @param message AmazonS3BucketConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAmazonS3BucketConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AmazonS3BucketConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AmazonS3BucketConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AmazonS3BucketConditions; + + /** + * Decodes an AmazonS3BucketConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AmazonS3BucketConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AmazonS3BucketConditions; + + /** + * Verifies an AmazonS3BucketConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AmazonS3BucketConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AmazonS3BucketConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AmazonS3BucketConditions; + + /** + * Creates a plain object from an AmazonS3BucketConditions message. Also converts values to other types if specified. + * @param message AmazonS3BucketConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AmazonS3BucketConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AmazonS3BucketConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AmazonS3BucketConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AmazonS3BucketConditions { + + /** BucketType enum. */ + enum BucketType { + TYPE_UNSPECIFIED = 0, + TYPE_ALL_SUPPORTED = 1, + TYPE_GENERAL_PURPOSE = 2 + } + + /** ObjectStorageClass enum. */ + enum ObjectStorageClass { + UNSPECIFIED = 0, + ALL_SUPPORTED_CLASSES = 1, + STANDARD = 2, + STANDARD_INFREQUENT_ACCESS = 4, + GLACIER_INSTANT_RETRIEVAL = 6, + INTELLIGENT_TIERING = 7 + } + } + + /** Properties of a DiscoveryOtherCloudGenerationCadence. */ + interface IDiscoveryOtherCloudGenerationCadence { + + /** DiscoveryOtherCloudGenerationCadence refreshFrequency */ + refreshFrequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + + /** DiscoveryOtherCloudGenerationCadence inspectTemplateModifiedCadence */ + inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + } + + /** Represents a DiscoveryOtherCloudGenerationCadence. */ + class DiscoveryOtherCloudGenerationCadence implements IDiscoveryOtherCloudGenerationCadence { + + /** + * Constructs a new DiscoveryOtherCloudGenerationCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence); + + /** DiscoveryOtherCloudGenerationCadence refreshFrequency. */ + public refreshFrequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** DiscoveryOtherCloudGenerationCadence inspectTemplateModifiedCadence. */ + public inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + + /** + * Creates a new DiscoveryOtherCloudGenerationCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryOtherCloudGenerationCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence): google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence; + + /** + * Encodes the specified DiscoveryOtherCloudGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify|verify} messages. + * @param message DiscoveryOtherCloudGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryOtherCloudGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify|verify} messages. + * @param message DiscoveryOtherCloudGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryOtherCloudGenerationCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryOtherCloudGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence; + + /** + * Decodes a DiscoveryOtherCloudGenerationCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryOtherCloudGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence; + + /** + * Verifies a DiscoveryOtherCloudGenerationCadence 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 DiscoveryOtherCloudGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryOtherCloudGenerationCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence; + + /** + * Creates a plain object from a DiscoveryOtherCloudGenerationCadence message. Also converts values to other types if specified. + * @param message DiscoveryOtherCloudGenerationCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryOtherCloudGenerationCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryOtherCloudGenerationCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryStartingLocation. */ + interface IDiscoveryStartingLocation { + + /** DiscoveryStartingLocation organizationId */ + organizationId?: (number|Long|string|null); + + /** DiscoveryStartingLocation folderId */ + folderId?: (number|Long|string|null); + } + + /** Represents a DiscoveryStartingLocation. */ + class DiscoveryStartingLocation implements IDiscoveryStartingLocation { + + /** + * Constructs a new DiscoveryStartingLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryStartingLocation); + + /** DiscoveryStartingLocation organizationId. */ + public organizationId?: (number|Long|string|null); + + /** DiscoveryStartingLocation folderId. */ + public folderId?: (number|Long|string|null); + + /** DiscoveryStartingLocation location. */ + public location?: ("organizationId"|"folderId"); + + /** + * Creates a new DiscoveryStartingLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryStartingLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryStartingLocation): google.privacy.dlp.v2.DiscoveryStartingLocation; + + /** + * Encodes the specified DiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. + * @param message DiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. + * @param message DiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryStartingLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryStartingLocation; + + /** + * Decodes a DiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryStartingLocation; + + /** + * Verifies a DiscoveryStartingLocation 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 DiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryStartingLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryStartingLocation; + + /** + * Creates a plain object from a DiscoveryStartingLocation message. Also converts values to other types if specified. + * @param message DiscoveryStartingLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryStartingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryStartingLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryStartingLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudDiscoveryStartingLocation. */ + interface IOtherCloudDiscoveryStartingLocation { + + /** OtherCloudDiscoveryStartingLocation awsLocation */ + awsLocation?: (google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation|null); + } + + /** Represents an OtherCloudDiscoveryStartingLocation. */ + class OtherCloudDiscoveryStartingLocation implements IOtherCloudDiscoveryStartingLocation { + + /** + * Constructs a new OtherCloudDiscoveryStartingLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation); + + /** OtherCloudDiscoveryStartingLocation awsLocation. */ + public awsLocation?: (google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation|null); + + /** OtherCloudDiscoveryStartingLocation location. */ + public location?: "awsLocation"; + + /** + * Creates a new OtherCloudDiscoveryStartingLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudDiscoveryStartingLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation; + + /** + * Encodes the specified OtherCloudDiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify|verify} messages. + * @param message OtherCloudDiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudDiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify|verify} messages. + * @param message OtherCloudDiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudDiscoveryStartingLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation; + + /** + * Decodes an OtherCloudDiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation; + + /** + * Verifies an OtherCloudDiscoveryStartingLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudDiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudDiscoveryStartingLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation; + + /** + * Creates a plain object from an OtherCloudDiscoveryStartingLocation message. Also converts values to other types if specified. + * @param message OtherCloudDiscoveryStartingLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudDiscoveryStartingLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudDiscoveryStartingLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OtherCloudDiscoveryStartingLocation { + + /** Properties of an AwsDiscoveryStartingLocation. */ + interface IAwsDiscoveryStartingLocation { + + /** AwsDiscoveryStartingLocation accountId */ + accountId?: (string|null); + + /** AwsDiscoveryStartingLocation allAssetInventoryAssets */ + allAssetInventoryAssets?: (boolean|null); + } + + /** Represents an AwsDiscoveryStartingLocation. */ + class AwsDiscoveryStartingLocation implements IAwsDiscoveryStartingLocation { + + /** + * Constructs a new AwsDiscoveryStartingLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation); + + /** AwsDiscoveryStartingLocation accountId. */ + public accountId?: (string|null); + + /** AwsDiscoveryStartingLocation allAssetInventoryAssets. */ + public allAssetInventoryAssets?: (boolean|null); + + /** AwsDiscoveryStartingLocation scope. */ + public scope?: ("accountId"|"allAssetInventoryAssets"); + + /** + * Creates a new AwsDiscoveryStartingLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsDiscoveryStartingLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation; + + /** + * Encodes the specified AwsDiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify|verify} messages. + * @param message AwsDiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsDiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify|verify} messages. + * @param message AwsDiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsDiscoveryStartingLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation; + + /** + * Decodes an AwsDiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation; + + /** + * Verifies an AwsDiscoveryStartingLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AwsDiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsDiscoveryStartingLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation; + + /** + * Creates a plain object from an AwsDiscoveryStartingLocation message. Also converts values to other types if specified. + * @param message AwsDiscoveryStartingLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsDiscoveryStartingLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsDiscoveryStartingLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + /** Properties of an AllOtherResources. */ interface IAllOtherResources { } diff --git a/packages/google-privacy-dlp/protos/protos.js b/packages/google-privacy-dlp/protos/protos.js index faf2b69e6ec..95bd8301f5c 100644 --- a/packages/google-privacy-dlp/protos/protos.js +++ b/packages/google-privacy-dlp/protos/protos.js @@ -49968,6 +49968,8 @@ * @interface IDataProfileAction * @property {google.privacy.dlp.v2.DataProfileAction.IExport|null} [exportData] DataProfileAction exportData * @property {google.privacy.dlp.v2.DataProfileAction.IPubSubNotification|null} [pubSubNotification] DataProfileAction pubSubNotification + * @property {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null} [publishToChronicle] DataProfileAction publishToChronicle + * @property {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null} [publishToScc] DataProfileAction publishToScc * @property {google.privacy.dlp.v2.DataProfileAction.ITagResources|null} [tagResources] DataProfileAction tagResources */ @@ -50002,6 +50004,22 @@ */ DataProfileAction.prototype.pubSubNotification = null; + /** + * DataProfileAction publishToChronicle. + * @member {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null|undefined} publishToChronicle + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + DataProfileAction.prototype.publishToChronicle = null; + + /** + * DataProfileAction publishToScc. + * @member {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null|undefined} publishToScc + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + DataProfileAction.prototype.publishToScc = null; + /** * DataProfileAction tagResources. * @member {google.privacy.dlp.v2.DataProfileAction.ITagResources|null|undefined} tagResources @@ -50015,12 +50033,12 @@ /** * DataProfileAction action. - * @member {"exportData"|"pubSubNotification"|"tagResources"|undefined} action + * @member {"exportData"|"pubSubNotification"|"publishToChronicle"|"publishToScc"|"tagResources"|undefined} action * @memberof google.privacy.dlp.v2.DataProfileAction * @instance */ Object.defineProperty(DataProfileAction.prototype, "action", { - get: $util.oneOfGetter($oneOfFields = ["exportData", "pubSubNotification", "tagResources"]), + get: $util.oneOfGetter($oneOfFields = ["exportData", "pubSubNotification", "publishToChronicle", "publishToScc", "tagResources"]), set: $util.oneOfSetter($oneOfFields) }); @@ -50052,6 +50070,10 @@ $root.google.privacy.dlp.v2.DataProfileAction.Export.encode(message.exportData, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.pubSubNotification != null && Object.hasOwnProperty.call(message, "pubSubNotification")) $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.encode(message.pubSubNotification, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.publishToChronicle != null && Object.hasOwnProperty.call(message, "publishToChronicle")) + $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.encode(message.publishToChronicle, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.publishToScc != null && Object.hasOwnProperty.call(message, "publishToScc")) + $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.encode(message.publishToScc, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.tagResources != null && Object.hasOwnProperty.call(message, "tagResources")) $root.google.privacy.dlp.v2.DataProfileAction.TagResources.encode(message.tagResources, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; @@ -50096,6 +50118,14 @@ message.pubSubNotification = $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.decode(reader, reader.uint32()); break; } + case 3: { + message.publishToChronicle = $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.decode(reader, reader.uint32()); + break; + } + case 4: { + message.publishToScc = $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.decode(reader, reader.uint32()); + break; + } case 8: { message.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.decode(reader, reader.uint32()); break; @@ -50154,6 +50184,26 @@ return "pubSubNotification." + error; } } + if (message.publishToChronicle != null && message.hasOwnProperty("publishToChronicle")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify(message.publishToChronicle); + if (error) + return "publishToChronicle." + error; + } + } + if (message.publishToScc != null && message.hasOwnProperty("publishToScc")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify(message.publishToScc); + if (error) + return "publishToScc." + error; + } + } if (message.tagResources != null && message.hasOwnProperty("tagResources")) { if (properties.action === 1) return "action: multiple values"; @@ -50189,6 +50239,16 @@ throw TypeError(".google.privacy.dlp.v2.DataProfileAction.pubSubNotification: object expected"); message.pubSubNotification = $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.fromObject(object.pubSubNotification); } + if (object.publishToChronicle != null) { + if (typeof object.publishToChronicle !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.publishToChronicle: object expected"); + message.publishToChronicle = $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.fromObject(object.publishToChronicle); + } + if (object.publishToScc != null) { + if (typeof object.publishToScc !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.publishToScc: object expected"); + message.publishToScc = $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.fromObject(object.publishToScc); + } if (object.tagResources != null) { if (typeof object.tagResources !== "object") throw TypeError(".google.privacy.dlp.v2.DataProfileAction.tagResources: object expected"); @@ -50220,6 +50280,16 @@ if (options.oneofs) object.action = "pubSubNotification"; } + if (message.publishToChronicle != null && message.hasOwnProperty("publishToChronicle")) { + object.publishToChronicle = $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.toObject(message.publishToChronicle, options); + if (options.oneofs) + object.action = "publishToChronicle"; + } + if (message.publishToScc != null && message.hasOwnProperty("publishToScc")) { + object.publishToScc = $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.toObject(message.publishToScc, options); + if (options.oneofs) + object.action = "publishToScc"; + } if (message.tagResources != null && message.hasOwnProperty("tagResources")) { object.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.toObject(message.tagResources, options); if (options.oneofs) @@ -50841,28 +50911,23 @@ return values; })(); - DataProfileAction.TagResources = (function() { + DataProfileAction.PublishToChronicle = (function() { /** - * Properties of a TagResources. + * Properties of a PublishToChronicle. * @memberof google.privacy.dlp.v2.DataProfileAction - * @interface ITagResources - * @property {Array.|null} [tagConditions] TagResources tagConditions - * @property {Array.|null} [profileGenerationsToTag] TagResources profileGenerationsToTag - * @property {boolean|null} [lowerDataRiskToLow] TagResources lowerDataRiskToLow + * @interface IPublishToChronicle */ /** - * Constructs a new TagResources. + * Constructs a new PublishToChronicle. * @memberof google.privacy.dlp.v2.DataProfileAction - * @classdesc Represents a TagResources. - * @implements ITagResources + * @classdesc Represents a PublishToChronicle. + * @implements IPublishToChronicle * @constructor - * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources=} [properties] Properties to set + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle=} [properties] Properties to set */ - function TagResources(properties) { - this.tagConditions = []; - this.profileGenerationsToTag = []; + function PublishToChronicle(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -50870,119 +50935,63 @@ } /** - * TagResources tagConditions. - * @member {Array.} tagConditions - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources - * @instance - */ - TagResources.prototype.tagConditions = $util.emptyArray; - - /** - * TagResources profileGenerationsToTag. - * @member {Array.} profileGenerationsToTag - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources - * @instance - */ - TagResources.prototype.profileGenerationsToTag = $util.emptyArray; - - /** - * TagResources lowerDataRiskToLow. - * @member {boolean} lowerDataRiskToLow - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources - * @instance - */ - TagResources.prototype.lowerDataRiskToLow = false; - - /** - * Creates a new TagResources instance using the specified properties. + * Creates a new PublishToChronicle instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static - * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources instance + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} PublishToChronicle instance */ - TagResources.create = function create(properties) { - return new TagResources(properties); + PublishToChronicle.create = function create(properties) { + return new PublishToChronicle(properties); }; /** - * Encodes the specified TagResources message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages. + * Encodes the specified PublishToChronicle message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static - * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources} message TagResources message or plain object to encode + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle} message PublishToChronicle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TagResources.encode = function encode(message, writer) { + PublishToChronicle.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tagConditions != null && message.tagConditions.length) - for (var i = 0; i < message.tagConditions.length; ++i) - $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.encode(message.tagConditions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.profileGenerationsToTag != null && message.profileGenerationsToTag.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.profileGenerationsToTag.length; ++i) - writer.int32(message.profileGenerationsToTag[i]); - writer.ldelim(); - } - if (message.lowerDataRiskToLow != null && Object.hasOwnProperty.call(message, "lowerDataRiskToLow")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.lowerDataRiskToLow); return writer; }; /** - * Encodes the specified TagResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages. + * Encodes the specified PublishToChronicle message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static - * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources} message TagResources message or plain object to encode + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle} message PublishToChronicle message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TagResources.encodeDelimited = function encodeDelimited(message, writer) { + PublishToChronicle.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TagResources message from the specified reader or buffer. + * Decodes a PublishToChronicle message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} PublishToChronicle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TagResources.decode = function decode(reader, length) { + PublishToChronicle.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - if (!(message.tagConditions && message.tagConditions.length)) - message.tagConditions = []; - message.tagConditions.push($root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.profileGenerationsToTag && message.profileGenerationsToTag.length)) - message.profileGenerationsToTag = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.profileGenerationsToTag.push(reader.int32()); - } else - message.profileGenerationsToTag.push(reader.int32()); - break; - } - case 3: { - message.lowerDataRiskToLow = reader.bool(); - break; - } default: reader.skipType(tag & 7); break; @@ -50992,678 +51001,5443 @@ }; /** - * Decodes a TagResources message from the specified reader or buffer, length delimited. + * Decodes a PublishToChronicle message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} PublishToChronicle * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TagResources.decodeDelimited = function decodeDelimited(reader) { + PublishToChronicle.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TagResources message. + * Verifies a PublishToChronicle message. * @function verify - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TagResources.verify = function verify(message) { + PublishToChronicle.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.tagConditions != null && message.hasOwnProperty("tagConditions")) { - if (!Array.isArray(message.tagConditions)) - return "tagConditions: array expected"; - for (var i = 0; i < message.tagConditions.length; ++i) { - var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify(message.tagConditions[i]); - if (error) - return "tagConditions." + error; - } - } - if (message.profileGenerationsToTag != null && message.hasOwnProperty("profileGenerationsToTag")) { - if (!Array.isArray(message.profileGenerationsToTag)) - return "profileGenerationsToTag: array expected"; - for (var i = 0; i < message.profileGenerationsToTag.length; ++i) - switch (message.profileGenerationsToTag[i]) { - default: - return "profileGenerationsToTag: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow")) - if (typeof message.lowerDataRiskToLow !== "boolean") - return "lowerDataRiskToLow: boolean expected"; return null; }; /** - * Creates a TagResources message from a plain object. Also converts values to their respective internal types. + * Creates a PublishToChronicle message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} PublishToChronicle */ - TagResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources) + PublishToChronicle.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle) return object; - var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources(); - if (object.tagConditions) { - if (!Array.isArray(object.tagConditions)) - throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.tagConditions: array expected"); - message.tagConditions = []; - for (var i = 0; i < object.tagConditions.length; ++i) { - if (typeof object.tagConditions[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.tagConditions: object expected"); - message.tagConditions[i] = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.fromObject(object.tagConditions[i]); - } - } - if (object.profileGenerationsToTag) { - if (!Array.isArray(object.profileGenerationsToTag)) - throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.profileGenerationsToTag: array expected"); - message.profileGenerationsToTag = []; - for (var i = 0; i < object.profileGenerationsToTag.length; ++i) - switch (object.profileGenerationsToTag[i]) { - default: - if (typeof object.profileGenerationsToTag[i] === "number") { - message.profileGenerationsToTag[i] = object.profileGenerationsToTag[i]; - break; - } - case "PROFILE_GENERATION_UNSPECIFIED": - case 0: - message.profileGenerationsToTag[i] = 0; - break; - case "PROFILE_GENERATION_NEW": - case 1: - message.profileGenerationsToTag[i] = 1; - break; - case "PROFILE_GENERATION_UPDATE": - case 2: - message.profileGenerationsToTag[i] = 2; - break; - } - } - if (object.lowerDataRiskToLow != null) - message.lowerDataRiskToLow = Boolean(object.lowerDataRiskToLow); - return message; + return new $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle(); }; /** - * Creates a plain object from a TagResources message. Also converts values to other types if specified. + * Creates a plain object from a PublishToChronicle message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources} message TagResources + * @param {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} message PublishToChronicle * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TagResources.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.tagConditions = []; - object.profileGenerationsToTag = []; - } - if (options.defaults) - object.lowerDataRiskToLow = false; - if (message.tagConditions && message.tagConditions.length) { - object.tagConditions = []; - for (var j = 0; j < message.tagConditions.length; ++j) - object.tagConditions[j] = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.toObject(message.tagConditions[j], options); - } - if (message.profileGenerationsToTag && message.profileGenerationsToTag.length) { - object.profileGenerationsToTag = []; - for (var j = 0; j < message.profileGenerationsToTag.length; ++j) - object.profileGenerationsToTag[j] = options.enums === String ? $root.google.privacy.dlp.v2.ProfileGeneration[message.profileGenerationsToTag[j]] === undefined ? message.profileGenerationsToTag[j] : $root.google.privacy.dlp.v2.ProfileGeneration[message.profileGenerationsToTag[j]] : message.profileGenerationsToTag[j]; - } - if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow")) - object.lowerDataRiskToLow = message.lowerDataRiskToLow; - return object; + PublishToChronicle.toObject = function toObject() { + return {}; }; /** - * Converts this TagResources to JSON. + * Converts this PublishToChronicle to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @instance * @returns {Object.} JSON object */ - TagResources.prototype.toJSON = function toJSON() { + PublishToChronicle.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TagResources + * Gets the default type url for PublishToChronicle * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TagResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PublishToChronicle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PublishToChronicle"; }; - TagResources.TagCondition = (function() { + return PublishToChronicle; + })(); - /** - * Properties of a TagCondition. - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources - * @interface ITagCondition - * @property {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null} [tag] TagCondition tag - * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] TagCondition sensitivityScore - */ + DataProfileAction.PublishToSecurityCommandCenter = (function() { - /** - * Constructs a new TagCondition. - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources - * @classdesc Represents a TagCondition. - * @implements ITagCondition - * @constructor - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition=} [properties] Properties to set - */ - function TagCondition(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a PublishToSecurityCommandCenter. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @interface IPublishToSecurityCommandCenter + */ - /** - * TagCondition tag. - * @member {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null|undefined} tag - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @instance - */ - TagCondition.prototype.tag = null; + /** + * Constructs a new PublishToSecurityCommandCenter. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @classdesc Represents a PublishToSecurityCommandCenter. + * @implements IPublishToSecurityCommandCenter + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter=} [properties] Properties to set + */ + function PublishToSecurityCommandCenter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * TagCondition sensitivityScore. - * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @instance - */ - TagCondition.prototype.sensitivityScore = null; + /** + * Creates a new PublishToSecurityCommandCenter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} PublishToSecurityCommandCenter instance + */ + PublishToSecurityCommandCenter.create = function create(properties) { + return new PublishToSecurityCommandCenter(properties); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Encodes the specified PublishToSecurityCommandCenter message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter} message PublishToSecurityCommandCenter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToSecurityCommandCenter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * TagCondition type. - * @member {"sensitivityScore"|undefined} type - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @instance - */ - Object.defineProperty(TagCondition.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["sensitivityScore"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Encodes the specified PublishToSecurityCommandCenter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter} message PublishToSecurityCommandCenter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToSecurityCommandCenter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Creates a new TagCondition instance using the specified properties. - * @function create - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition instance - */ - TagCondition.create = function create(properties) { - return new TagCondition(properties); - }; + /** + * Decodes a PublishToSecurityCommandCenter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} PublishToSecurityCommandCenter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToSecurityCommandCenter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * Encodes the specified TagCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages. - * @function encode - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition} message TagCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagCondition.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) - $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) - $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; + /** + * Decodes a PublishToSecurityCommandCenter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} PublishToSecurityCommandCenter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToSecurityCommandCenter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Encodes the specified TagCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages. - * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition} message TagCondition message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagCondition.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Verifies a PublishToSecurityCommandCenter message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishToSecurityCommandCenter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Decodes a TagCondition message from the specified reader or buffer. - * @function decode - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagCondition.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.decode(reader, reader.uint32()); - break; - } - case 2: { - message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a PublishToSecurityCommandCenter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} PublishToSecurityCommandCenter + */ + PublishToSecurityCommandCenter.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter) + return object; + return new $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter(); + }; - /** - * Decodes a TagCondition message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagCondition.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a plain object from a PublishToSecurityCommandCenter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} message PublishToSecurityCommandCenter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishToSecurityCommandCenter.toObject = function toObject() { + return {}; + }; - /** - * Verifies a TagCondition message. - * @function verify - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TagCondition.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.tag != null && message.hasOwnProperty("tag")) { - var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify(message.tag); - if (error) - return "tag." + error; - } - if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { - properties.type = 1; - { - var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore); - if (error) - return "sensitivityScore." + error; - } - } - return null; - }; + /** + * Converts this PublishToSecurityCommandCenter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @instance + * @returns {Object.} JSON object + */ + PublishToSecurityCommandCenter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a TagCondition message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition - */ - TagCondition.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition) - return object; - var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition(); - if (object.tag != null) { - if (typeof object.tag !== "object") - throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.tag: object expected"); - message.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.fromObject(object.tag); - } - if (object.sensitivityScore != null) { - if (typeof object.sensitivityScore !== "object") - throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.sensitivityScore: object expected"); - message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore); - } - return message; - }; - - /** - * Creates a plain object from a TagCondition message. Also converts values to other types if specified. - * @function toObject - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} message TagCondition - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TagCondition.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.tag = null; - if (message.tag != null && message.hasOwnProperty("tag")) - object.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.toObject(message.tag, options); - if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { - object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); - if (options.oneofs) - object.type = "sensitivityScore"; - } - return object; - }; - - /** - * Converts this TagCondition to JSON. - * @function toJSON - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @instance - * @returns {Object.} JSON object - */ - TagCondition.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TagCondition - * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TagCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition"; - }; + /** + * Gets the default type url for PublishToSecurityCommandCenter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishToSecurityCommandCenter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter"; + }; - return TagCondition; - })(); + return PublishToSecurityCommandCenter; + })(); - TagResources.TagValue = (function() { + DataProfileAction.TagResources = (function() { - /** - * Properties of a TagValue. - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources - * @interface ITagValue - * @property {string|null} [namespacedValue] TagValue namespacedValue - */ + /** + * Properties of a TagResources. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @interface ITagResources + * @property {Array.|null} [tagConditions] TagResources tagConditions + * @property {Array.|null} [profileGenerationsToTag] TagResources profileGenerationsToTag + * @property {boolean|null} [lowerDataRiskToLow] TagResources lowerDataRiskToLow + */ - /** - * Constructs a new TagValue. - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources - * @classdesc Represents a TagValue. - * @implements ITagValue - * @constructor - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue=} [properties] Properties to set - */ - function TagValue(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Constructs a new TagResources. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @classdesc Represents a TagResources. + * @implements ITagResources + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources=} [properties] Properties to set + */ + function TagResources(properties) { + this.tagConditions = []; + this.profileGenerationsToTag = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * TagValue namespacedValue. - * @member {string|null|undefined} namespacedValue - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @instance - */ - TagValue.prototype.namespacedValue = null; + /** + * TagResources tagConditions. + * @member {Array.} tagConditions + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @instance + */ + TagResources.prototype.tagConditions = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * TagResources profileGenerationsToTag. + * @member {Array.} profileGenerationsToTag + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @instance + */ + TagResources.prototype.profileGenerationsToTag = $util.emptyArray; - /** - * TagValue format. - * @member {"namespacedValue"|undefined} format - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @instance - */ - Object.defineProperty(TagValue.prototype, "format", { - get: $util.oneOfGetter($oneOfFields = ["namespacedValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * TagResources lowerDataRiskToLow. + * @member {boolean} lowerDataRiskToLow + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @instance + */ + TagResources.prototype.lowerDataRiskToLow = false; - /** - * Creates a new TagValue instance using the specified properties. - * @function create - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue instance - */ - TagValue.create = function create(properties) { - return new TagValue(properties); - }; + /** + * Creates a new TagResources instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources instance + */ + TagResources.create = function create(properties) { + return new TagResources(properties); + }; - /** - * Encodes the specified TagValue message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages. - * @function encode - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue} message TagValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagValue.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.namespacedValue != null && Object.hasOwnProperty.call(message, "namespacedValue")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespacedValue); - return writer; - }; + /** + * Encodes the specified TagResources message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources} message TagResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tagConditions != null && message.tagConditions.length) + for (var i = 0; i < message.tagConditions.length; ++i) + $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.encode(message.tagConditions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.profileGenerationsToTag != null && message.profileGenerationsToTag.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.profileGenerationsToTag.length; ++i) + writer.int32(message.profileGenerationsToTag[i]); + writer.ldelim(); + } + if (message.lowerDataRiskToLow != null && Object.hasOwnProperty.call(message, "lowerDataRiskToLow")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.lowerDataRiskToLow); + return writer; + }; - /** - * Encodes the specified TagValue message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue} message TagValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TagValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified TagResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources} message TagResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a TagValue message from the specified reader or buffer. - * @function decode - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagValue.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.namespacedValue = reader.string(); + /** + * Decodes a TagResources message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagResources.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.tagConditions && message.tagConditions.length)) + message.tagConditions = []; + message.tagConditions.push($root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.profileGenerationsToTag && message.profileGenerationsToTag.length)) + message.profileGenerationsToTag = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.profileGenerationsToTag.push(reader.int32()); + } else + message.profileGenerationsToTag.push(reader.int32()); + break; + } + case 3: { + message.lowerDataRiskToLow = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TagResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagResources message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagResources.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.tagConditions != null && message.hasOwnProperty("tagConditions")) { + if (!Array.isArray(message.tagConditions)) + return "tagConditions: array expected"; + for (var i = 0; i < message.tagConditions.length; ++i) { + var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify(message.tagConditions[i]); + if (error) + return "tagConditions." + error; + } + } + if (message.profileGenerationsToTag != null && message.hasOwnProperty("profileGenerationsToTag")) { + if (!Array.isArray(message.profileGenerationsToTag)) + return "profileGenerationsToTag: array expected"; + for (var i = 0; i < message.profileGenerationsToTag.length; ++i) + switch (message.profileGenerationsToTag[i]) { + default: + return "profileGenerationsToTag: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow")) + if (typeof message.lowerDataRiskToLow !== "boolean") + return "lowerDataRiskToLow: boolean expected"; + return null; + }; + + /** + * Creates a TagResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + */ + TagResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources) + return object; + var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources(); + if (object.tagConditions) { + if (!Array.isArray(object.tagConditions)) + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.tagConditions: array expected"); + message.tagConditions = []; + for (var i = 0; i < object.tagConditions.length; ++i) { + if (typeof object.tagConditions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.tagConditions: object expected"); + message.tagConditions[i] = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.fromObject(object.tagConditions[i]); + } + } + if (object.profileGenerationsToTag) { + if (!Array.isArray(object.profileGenerationsToTag)) + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.profileGenerationsToTag: array expected"); + message.profileGenerationsToTag = []; + for (var i = 0; i < object.profileGenerationsToTag.length; ++i) + switch (object.profileGenerationsToTag[i]) { + default: + if (typeof object.profileGenerationsToTag[i] === "number") { + message.profileGenerationsToTag[i] = object.profileGenerationsToTag[i]; break; } - default: - reader.skipType(tag & 7); + case "PROFILE_GENERATION_UNSPECIFIED": + case 0: + message.profileGenerationsToTag[i] = 0; + break; + case "PROFILE_GENERATION_NEW": + case 1: + message.profileGenerationsToTag[i] = 1; + break; + case "PROFILE_GENERATION_UPDATE": + case 2: + message.profileGenerationsToTag[i] = 2; + break; + } + } + if (object.lowerDataRiskToLow != null) + message.lowerDataRiskToLow = Boolean(object.lowerDataRiskToLow); + return message; + }; + + /** + * Creates a plain object from a TagResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources} message TagResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tagConditions = []; + object.profileGenerationsToTag = []; + } + if (options.defaults) + object.lowerDataRiskToLow = false; + if (message.tagConditions && message.tagConditions.length) { + object.tagConditions = []; + for (var j = 0; j < message.tagConditions.length; ++j) + object.tagConditions[j] = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.toObject(message.tagConditions[j], options); + } + if (message.profileGenerationsToTag && message.profileGenerationsToTag.length) { + object.profileGenerationsToTag = []; + for (var j = 0; j < message.profileGenerationsToTag.length; ++j) + object.profileGenerationsToTag[j] = options.enums === String ? $root.google.privacy.dlp.v2.ProfileGeneration[message.profileGenerationsToTag[j]] === undefined ? message.profileGenerationsToTag[j] : $root.google.privacy.dlp.v2.ProfileGeneration[message.profileGenerationsToTag[j]] : message.profileGenerationsToTag[j]; + } + if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow")) + object.lowerDataRiskToLow = message.lowerDataRiskToLow; + return object; + }; + + /** + * Converts this TagResources to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @instance + * @returns {Object.} JSON object + */ + TagResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagResources + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources"; + }; + + TagResources.TagCondition = (function() { + + /** + * Properties of a TagCondition. + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @interface ITagCondition + * @property {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null} [tag] TagCondition tag + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] TagCondition sensitivityScore + */ + + /** + * Constructs a new TagCondition. + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @classdesc Represents a TagCondition. + * @implements ITagCondition + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition=} [properties] Properties to set + */ + function TagCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagCondition tag. + * @member {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null|undefined} tag + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @instance + */ + TagCondition.prototype.tag = null; + + /** + * TagCondition sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @instance + */ + TagCondition.prototype.sensitivityScore = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TagCondition type. + * @member {"sensitivityScore"|undefined} type + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @instance + */ + Object.defineProperty(TagCondition.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["sensitivityScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TagCondition instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition instance + */ + TagCondition.create = function create(properties) { + return new TagCondition(properties); + }; + + /** + * Encodes the specified TagCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition} message TagCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TagCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition} message TagCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagCondition message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagCondition.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TagCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagCondition message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagCondition.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tag != null && message.hasOwnProperty("tag")) { + var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify(message.tag); + if (error) + return "tag." + error; + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore); + if (error) + return "sensitivityScore." + error; + } + } + return null; + }; + + /** + * Creates a TagCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition + */ + TagCondition.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition) + return object; + var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition(); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.tag: object expected"); + message.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.fromObject(object.tag); + } + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore); + } + return message; + }; + + /** + * Creates a plain object from a TagCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} message TagCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tag = null; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.toObject(message.tag, options); + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (options.oneofs) + object.type = "sensitivityScore"; + } + return object; + }; + + /** + * Converts this TagCondition to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @instance + * @returns {Object.} JSON object + */ + TagCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagCondition + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition"; + }; + + return TagCondition; + })(); + + TagResources.TagValue = (function() { + + /** + * Properties of a TagValue. + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @interface ITagValue + * @property {string|null} [namespacedValue] TagValue namespacedValue + */ + + /** + * Constructs a new TagValue. + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @classdesc Represents a TagValue. + * @implements ITagValue + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue=} [properties] Properties to set + */ + function TagValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagValue namespacedValue. + * @member {string|null|undefined} namespacedValue + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @instance + */ + TagValue.prototype.namespacedValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TagValue format. + * @member {"namespacedValue"|undefined} format + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @instance + */ + Object.defineProperty(TagValue.prototype, "format", { + get: $util.oneOfGetter($oneOfFields = ["namespacedValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TagValue instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue instance + */ + TagValue.create = function create(properties) { + return new TagValue(properties); + }; + + /** + * Encodes the specified TagValue message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue} message TagValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.namespacedValue != null && Object.hasOwnProperty.call(message, "namespacedValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespacedValue); + return writer; + }; + + /** + * Encodes the specified TagValue message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue} message TagValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagValue message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagValue.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namespacedValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TagValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagValue message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagValue.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.namespacedValue != null && message.hasOwnProperty("namespacedValue")) { + properties.format = 1; + if (!$util.isString(message.namespacedValue)) + return "namespacedValue: string expected"; + } + return null; + }; + + /** + * Creates a TagValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue + */ + TagValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue) + return object; + var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue(); + if (object.namespacedValue != null) + message.namespacedValue = String(object.namespacedValue); + return message; + }; + + /** + * Creates a plain object from a TagValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} message TagValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.namespacedValue != null && message.hasOwnProperty("namespacedValue")) { + object.namespacedValue = message.namespacedValue; + if (options.oneofs) + object.format = "namespacedValue"; + } + return object; + }; + + /** + * Converts this TagValue to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @instance + * @returns {Object.} JSON object + */ + TagValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagValue + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue"; + }; + + return TagValue; + })(); + + return TagResources; + })(); + + return DataProfileAction; + })(); + + v2.DataProfileJobConfig = (function() { + + /** + * Properties of a DataProfileJobConfig. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileJobConfig + * @property {google.privacy.dlp.v2.IDataProfileLocation|null} [location] DataProfileJobConfig location + * @property {string|null} [projectId] DataProfileJobConfig projectId + * @property {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null} [otherCloudStartingLocation] DataProfileJobConfig otherCloudStartingLocation + * @property {Array.|null} [inspectTemplates] DataProfileJobConfig inspectTemplates + * @property {Array.|null} [dataProfileActions] DataProfileJobConfig dataProfileActions + */ + + /** + * Constructs a new DataProfileJobConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileJobConfig. + * @implements IDataProfileJobConfig + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileJobConfig=} [properties] Properties to set + */ + function DataProfileJobConfig(properties) { + this.inspectTemplates = []; + this.dataProfileActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileJobConfig location. + * @member {google.privacy.dlp.v2.IDataProfileLocation|null|undefined} location + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.location = null; + + /** + * DataProfileJobConfig projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.projectId = ""; + + /** + * DataProfileJobConfig otherCloudStartingLocation. + * @member {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null|undefined} otherCloudStartingLocation + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.otherCloudStartingLocation = null; + + /** + * DataProfileJobConfig inspectTemplates. + * @member {Array.} inspectTemplates + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.inspectTemplates = $util.emptyArray; + + /** + * DataProfileJobConfig dataProfileActions. + * @member {Array.} dataProfileActions + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.dataProfileActions = $util.emptyArray; + + /** + * Creates a new DataProfileJobConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {google.privacy.dlp.v2.IDataProfileJobConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig instance + */ + DataProfileJobConfig.create = function create(properties) { + return new DataProfileJobConfig(properties); + }; + + /** + * Encodes the specified DataProfileJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileJobConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {google.privacy.dlp.v2.IDataProfileJobConfig} message DataProfileJobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileJobConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.privacy.dlp.v2.DataProfileLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.projectId); + if (message.dataProfileActions != null && message.dataProfileActions.length) + for (var i = 0; i < message.dataProfileActions.length; ++i) + $root.google.privacy.dlp.v2.DataProfileAction.encode(message.dataProfileActions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.inspectTemplates != null && message.inspectTemplates.length) + for (var i = 0; i < message.inspectTemplates.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.inspectTemplates[i]); + if (message.otherCloudStartingLocation != null && Object.hasOwnProperty.call(message, "otherCloudStartingLocation")) + $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.encode(message.otherCloudStartingLocation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileJobConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {google.privacy.dlp.v2.IDataProfileJobConfig} message DataProfileJobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileJobConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileJobConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileJobConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileJobConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = $root.google.privacy.dlp.v2.DataProfileLocation.decode(reader, reader.uint32()); + break; + } + case 5: { + message.projectId = reader.string(); + break; + } + case 8: { + message.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.inspectTemplates && message.inspectTemplates.length)) + message.inspectTemplates = []; + message.inspectTemplates.push(reader.string()); + break; + } + case 6: { + if (!(message.dataProfileActions && message.dataProfileActions.length)) + message.dataProfileActions = []; + message.dataProfileActions.push($root.google.privacy.dlp.v2.DataProfileAction.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileJobConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileJobConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileJobConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileJobConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.privacy.dlp.v2.DataProfileLocation.verify(message.location); + if (error) + return "location." + error; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.otherCloudStartingLocation != null && message.hasOwnProperty("otherCloudStartingLocation")) { + var error = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify(message.otherCloudStartingLocation); + if (error) + return "otherCloudStartingLocation." + error; + } + if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { + if (!Array.isArray(message.inspectTemplates)) + return "inspectTemplates: array expected"; + for (var i = 0; i < message.inspectTemplates.length; ++i) + if (!$util.isString(message.inspectTemplates[i])) + return "inspectTemplates: string[] expected"; + } + if (message.dataProfileActions != null && message.hasOwnProperty("dataProfileActions")) { + if (!Array.isArray(message.dataProfileActions)) + return "dataProfileActions: array expected"; + for (var i = 0; i < message.dataProfileActions.length; ++i) { + var error = $root.google.privacy.dlp.v2.DataProfileAction.verify(message.dataProfileActions[i]); + if (error) + return "dataProfileActions." + error; + } + } + return null; + }; + + /** + * Creates a DataProfileJobConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + */ + DataProfileJobConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileJobConfig) + return object; + var message = new $root.google.privacy.dlp.v2.DataProfileJobConfig(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.location: object expected"); + message.location = $root.google.privacy.dlp.v2.DataProfileLocation.fromObject(object.location); + } + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.otherCloudStartingLocation != null) { + if (typeof object.otherCloudStartingLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.otherCloudStartingLocation: object expected"); + message.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.fromObject(object.otherCloudStartingLocation); + } + if (object.inspectTemplates) { + if (!Array.isArray(object.inspectTemplates)) + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.inspectTemplates: array expected"); + message.inspectTemplates = []; + for (var i = 0; i < object.inspectTemplates.length; ++i) + message.inspectTemplates[i] = String(object.inspectTemplates[i]); + } + if (object.dataProfileActions) { + if (!Array.isArray(object.dataProfileActions)) + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.dataProfileActions: array expected"); + message.dataProfileActions = []; + for (var i = 0; i < object.dataProfileActions.length; ++i) { + if (typeof object.dataProfileActions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.dataProfileActions: object expected"); + message.dataProfileActions[i] = $root.google.privacy.dlp.v2.DataProfileAction.fromObject(object.dataProfileActions[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a DataProfileJobConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {google.privacy.dlp.v2.DataProfileJobConfig} message DataProfileJobConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileJobConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataProfileActions = []; + object.inspectTemplates = []; + } + if (options.defaults) { + object.location = null; + object.projectId = ""; + object.otherCloudStartingLocation = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.privacy.dlp.v2.DataProfileLocation.toObject(message.location, options); + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.dataProfileActions && message.dataProfileActions.length) { + object.dataProfileActions = []; + for (var j = 0; j < message.dataProfileActions.length; ++j) + object.dataProfileActions[j] = $root.google.privacy.dlp.v2.DataProfileAction.toObject(message.dataProfileActions[j], options); + } + if (message.inspectTemplates && message.inspectTemplates.length) { + object.inspectTemplates = []; + for (var j = 0; j < message.inspectTemplates.length; ++j) + object.inspectTemplates[j] = message.inspectTemplates[j]; + } + if (message.otherCloudStartingLocation != null && message.hasOwnProperty("otherCloudStartingLocation")) + object.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.toObject(message.otherCloudStartingLocation, options); + return object; + }; + + /** + * Converts this DataProfileJobConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + * @returns {Object.} JSON object + */ + DataProfileJobConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileJobConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileJobConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileJobConfig"; + }; + + return DataProfileJobConfig; + })(); + + v2.BigQueryRegex = (function() { + + /** + * Properties of a BigQueryRegex. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryRegex + * @property {string|null} [projectIdRegex] BigQueryRegex projectIdRegex + * @property {string|null} [datasetIdRegex] BigQueryRegex datasetIdRegex + * @property {string|null} [tableIdRegex] BigQueryRegex tableIdRegex + */ + + /** + * Constructs a new BigQueryRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryRegex. + * @implements IBigQueryRegex + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryRegex=} [properties] Properties to set + */ + function BigQueryRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryRegex projectIdRegex. + * @member {string} projectIdRegex + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @instance + */ + BigQueryRegex.prototype.projectIdRegex = ""; + + /** + * BigQueryRegex datasetIdRegex. + * @member {string} datasetIdRegex + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @instance + */ + BigQueryRegex.prototype.datasetIdRegex = ""; + + /** + * BigQueryRegex tableIdRegex. + * @member {string} tableIdRegex + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @instance + */ + BigQueryRegex.prototype.tableIdRegex = ""; + + /** + * Creates a new BigQueryRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex instance + */ + BigQueryRegex.create = function create(properties) { + return new BigQueryRegex(properties); + }; + + /** + * Encodes the specified BigQueryRegex message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegex} message BigQueryRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); + if (message.datasetIdRegex != null && Object.hasOwnProperty.call(message, "datasetIdRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetIdRegex); + if (message.tableIdRegex != null && Object.hasOwnProperty.call(message, "tableIdRegex")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableIdRegex); + return writer; + }; + + /** + * Encodes the specified BigQueryRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegex} message BigQueryRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryRegex.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.projectIdRegex = reader.string(); + break; + } + case 2: { + message.datasetIdRegex = reader.string(); + break; + } + case 3: { + message.tableIdRegex = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryRegex.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + if (!$util.isString(message.projectIdRegex)) + return "projectIdRegex: string expected"; + if (message.datasetIdRegex != null && message.hasOwnProperty("datasetIdRegex")) + if (!$util.isString(message.datasetIdRegex)) + return "datasetIdRegex: string expected"; + if (message.tableIdRegex != null && message.hasOwnProperty("tableIdRegex")) + if (!$util.isString(message.tableIdRegex)) + return "tableIdRegex: string expected"; + return null; + }; + + /** + * Creates a BigQueryRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + */ + BigQueryRegex.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryRegex) + return object; + var message = new $root.google.privacy.dlp.v2.BigQueryRegex(); + if (object.projectIdRegex != null) + message.projectIdRegex = String(object.projectIdRegex); + if (object.datasetIdRegex != null) + message.datasetIdRegex = String(object.datasetIdRegex); + if (object.tableIdRegex != null) + message.tableIdRegex = String(object.tableIdRegex); + return message; + }; + + /** + * Creates a plain object from a BigQueryRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {google.privacy.dlp.v2.BigQueryRegex} message BigQueryRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectIdRegex = ""; + object.datasetIdRegex = ""; + object.tableIdRegex = ""; + } + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + object.projectIdRegex = message.projectIdRegex; + if (message.datasetIdRegex != null && message.hasOwnProperty("datasetIdRegex")) + object.datasetIdRegex = message.datasetIdRegex; + if (message.tableIdRegex != null && message.hasOwnProperty("tableIdRegex")) + object.tableIdRegex = message.tableIdRegex; + return object; + }; + + /** + * Converts this BigQueryRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @instance + * @returns {Object.} JSON object + */ + BigQueryRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryRegex"; + }; + + return BigQueryRegex; + })(); + + v2.BigQueryRegexes = (function() { + + /** + * Properties of a BigQueryRegexes. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryRegexes + * @property {Array.|null} [patterns] BigQueryRegexes patterns + */ + + /** + * Constructs a new BigQueryRegexes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryRegexes. + * @implements IBigQueryRegexes + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryRegexes=} [properties] Properties to set + */ + function BigQueryRegexes(properties) { + this.patterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @instance + */ + BigQueryRegexes.prototype.patterns = $util.emptyArray; + + /** + * Creates a new BigQueryRegexes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes instance + */ + BigQueryRegexes.create = function create(properties) { + return new BigQueryRegexes(properties); + }; + + /** + * Encodes the specified BigQueryRegexes message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegexes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegexes} message BigQueryRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryRegexes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.BigQueryRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegexes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegexes} message BigQueryRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryRegexes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryRegexes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryRegexes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryRegexes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.BigQueryRegex.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryRegexes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryRegexes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryRegexes message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryRegexes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.BigQueryRegex.verify(message.patterns[i]); + if (error) + return "patterns." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryRegexes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + */ + BigQueryRegexes.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryRegexes) + return object; + var message = new $root.google.privacy.dlp.v2.BigQueryRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.BigQueryRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.BigQueryRegex.fromObject(object.patterns[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BigQueryRegexes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {google.privacy.dlp.v2.BigQueryRegexes} message BigQueryRegexes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryRegexes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.BigQueryRegex.toObject(message.patterns[j], options); + } + return object; + }; + + /** + * Converts this BigQueryRegexes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @instance + * @returns {Object.} JSON object + */ + BigQueryRegexes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryRegexes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryRegexes"; + }; + + return BigQueryRegexes; + })(); + + v2.BigQueryTableTypes = (function() { + + /** + * Properties of a BigQueryTableTypes. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryTableTypes + * @property {Array.|null} [types] BigQueryTableTypes types + */ + + /** + * Constructs a new BigQueryTableTypes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryTableTypes. + * @implements IBigQueryTableTypes + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryTableTypes=} [properties] Properties to set + */ + function BigQueryTableTypes(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableTypes types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @instance + */ + BigQueryTableTypes.prototype.types = $util.emptyArray; + + /** + * Creates a new BigQueryTableTypes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableTypes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes instance + */ + BigQueryTableTypes.create = function create(properties) { + return new BigQueryTableTypes(properties); + }; + + /** + * Encodes the specified BigQueryTableTypes message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableTypes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableTypes} message BigQueryTableTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableTypes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.types != null && message.types.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified BigQueryTableTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableTypes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableTypes} message BigQueryTableTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableTypes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableTypes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableTypes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryTableTypes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableTypes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableTypes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableTypes message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableTypes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a BigQueryTableTypes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + */ + BigQueryTableTypes.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryTableTypes) + return object; + var message = new $root.google.privacy.dlp.v2.BigQueryTableTypes(); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.BigQueryTableTypes.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "BIG_QUERY_TABLE_TYPE_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "BIG_QUERY_TABLE_TYPE_TABLE": + case 1: + message.types[i] = 1; + break; + case "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE": + case 2: + message.types[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableTypes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {google.privacy.dlp.v2.BigQueryTableTypes} message BigQueryTableTypes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableTypes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableType[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQueryTableType[message.types[j]] : message.types[j]; + } + return object; + }; + + /** + * Converts this BigQueryTableTypes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableTypes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTableTypes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTableTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryTableTypes"; + }; + + return BigQueryTableTypes; + })(); + + /** + * BigQueryTableTypeCollection enum. + * @name google.privacy.dlp.v2.BigQueryTableTypeCollection + * @enum {number} + * @property {number} BIG_QUERY_COLLECTION_UNSPECIFIED=0 BIG_QUERY_COLLECTION_UNSPECIFIED value + * @property {number} BIG_QUERY_COLLECTION_ALL_TYPES=1 BIG_QUERY_COLLECTION_ALL_TYPES value + * @property {number} BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES=2 BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES value + */ + v2.BigQueryTableTypeCollection = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BIG_QUERY_COLLECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "BIG_QUERY_COLLECTION_ALL_TYPES"] = 1; + values[valuesById[2] = "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES"] = 2; + return values; + })(); + + /** + * BigQueryTableType enum. + * @name google.privacy.dlp.v2.BigQueryTableType + * @enum {number} + * @property {number} BIG_QUERY_TABLE_TYPE_UNSPECIFIED=0 BIG_QUERY_TABLE_TYPE_UNSPECIFIED value + * @property {number} BIG_QUERY_TABLE_TYPE_TABLE=1 BIG_QUERY_TABLE_TYPE_TABLE value + * @property {number} BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE=2 BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE value + */ + v2.BigQueryTableType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BIG_QUERY_TABLE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BIG_QUERY_TABLE_TYPE_TABLE"] = 1; + values[valuesById[2] = "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE"] = 2; + return values; + })(); + + /** + * DataProfileUpdateFrequency enum. + * @name google.privacy.dlp.v2.DataProfileUpdateFrequency + * @enum {number} + * @property {number} UPDATE_FREQUENCY_UNSPECIFIED=0 UPDATE_FREQUENCY_UNSPECIFIED value + * @property {number} UPDATE_FREQUENCY_NEVER=1 UPDATE_FREQUENCY_NEVER value + * @property {number} UPDATE_FREQUENCY_DAILY=2 UPDATE_FREQUENCY_DAILY value + * @property {number} UPDATE_FREQUENCY_MONTHLY=4 UPDATE_FREQUENCY_MONTHLY value + */ + v2.DataProfileUpdateFrequency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPDATE_FREQUENCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "UPDATE_FREQUENCY_NEVER"] = 1; + values[valuesById[2] = "UPDATE_FREQUENCY_DAILY"] = 2; + values[valuesById[4] = "UPDATE_FREQUENCY_MONTHLY"] = 4; + return values; + })(); + + v2.Disabled = (function() { + + /** + * Properties of a Disabled. + * @memberof google.privacy.dlp.v2 + * @interface IDisabled + */ + + /** + * Constructs a new Disabled. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Disabled. + * @implements IDisabled + * @constructor + * @param {google.privacy.dlp.v2.IDisabled=} [properties] Properties to set + */ + function Disabled(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Disabled instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {google.privacy.dlp.v2.IDisabled=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Disabled} Disabled instance + */ + Disabled.create = function create(properties) { + return new Disabled(properties); + }; + + /** + * Encodes the specified Disabled message. Does not implicitly {@link google.privacy.dlp.v2.Disabled.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {google.privacy.dlp.v2.IDisabled} message Disabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Disabled.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Disabled message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Disabled.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {google.privacy.dlp.v2.IDisabled} message Disabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Disabled.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Disabled message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Disabled} Disabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Disabled.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Disabled(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Disabled message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Disabled} Disabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Disabled.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Disabled message. + * @function verify + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Disabled.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a Disabled message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Disabled} Disabled + */ + Disabled.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.Disabled) + return object; + return new $root.google.privacy.dlp.v2.Disabled(); + }; + + /** + * Creates a plain object from a Disabled message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {google.privacy.dlp.v2.Disabled} message Disabled + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Disabled.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Disabled to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Disabled + * @instance + * @returns {Object.} JSON object + */ + Disabled.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Disabled + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Disabled.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Disabled"; + }; + + return Disabled; + })(); + + v2.DataProfileLocation = (function() { + + /** + * Properties of a DataProfileLocation. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileLocation + * @property {number|Long|null} [organizationId] DataProfileLocation organizationId + * @property {number|Long|null} [folderId] DataProfileLocation folderId + */ + + /** + * Constructs a new DataProfileLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileLocation. + * @implements IDataProfileLocation + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileLocation=} [properties] Properties to set + */ + function DataProfileLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileLocation organizationId. + * @member {number|Long|null|undefined} organizationId + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @instance + */ + DataProfileLocation.prototype.organizationId = null; + + /** + * DataProfileLocation folderId. + * @member {number|Long|null|undefined} folderId + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @instance + */ + DataProfileLocation.prototype.folderId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataProfileLocation location. + * @member {"organizationId"|"folderId"|undefined} location + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @instance + */ + Object.defineProperty(DataProfileLocation.prototype, "location", { + get: $util.oneOfGetter($oneOfFields = ["organizationId", "folderId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataProfileLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation instance + */ + DataProfileLocation.create = function create(properties) { + return new DataProfileLocation(properties); + }; + + /** + * Encodes the specified DataProfileLocation message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileLocation} message DataProfileLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.organizationId); + if (message.folderId != null && Object.hasOwnProperty.call(message, "folderId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.folderId); + return writer; + }; + + /** + * Encodes the specified DataProfileLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileLocation} message DataProfileLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.organizationId = reader.int64(); + break; + } + case 2: { + message.folderId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) { + properties.location = 1; + if (!$util.isInteger(message.organizationId) && !(message.organizationId && $util.isInteger(message.organizationId.low) && $util.isInteger(message.organizationId.high))) + return "organizationId: integer|Long expected"; + } + if (message.folderId != null && message.hasOwnProperty("folderId")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + if (!$util.isInteger(message.folderId) && !(message.folderId && $util.isInteger(message.folderId.low) && $util.isInteger(message.folderId.high))) + return "folderId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a DataProfileLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + */ + DataProfileLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileLocation) + return object; + var message = new $root.google.privacy.dlp.v2.DataProfileLocation(); + if (object.organizationId != null) + if ($util.Long) + (message.organizationId = $util.Long.fromValue(object.organizationId)).unsigned = false; + else if (typeof object.organizationId === "string") + message.organizationId = parseInt(object.organizationId, 10); + else if (typeof object.organizationId === "number") + message.organizationId = object.organizationId; + else if (typeof object.organizationId === "object") + message.organizationId = new $util.LongBits(object.organizationId.low >>> 0, object.organizationId.high >>> 0).toNumber(); + if (object.folderId != null) + if ($util.Long) + (message.folderId = $util.Long.fromValue(object.folderId)).unsigned = false; + else if (typeof object.folderId === "string") + message.folderId = parseInt(object.folderId, 10); + else if (typeof object.folderId === "number") + message.folderId = object.folderId; + else if (typeof object.folderId === "object") + message.folderId = new $util.LongBits(object.folderId.low >>> 0, object.folderId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataProfileLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {google.privacy.dlp.v2.DataProfileLocation} message DataProfileLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) { + if (typeof message.organizationId === "number") + object.organizationId = options.longs === String ? String(message.organizationId) : message.organizationId; + else + object.organizationId = options.longs === String ? $util.Long.prototype.toString.call(message.organizationId) : options.longs === Number ? new $util.LongBits(message.organizationId.low >>> 0, message.organizationId.high >>> 0).toNumber() : message.organizationId; + if (options.oneofs) + object.location = "organizationId"; + } + if (message.folderId != null && message.hasOwnProperty("folderId")) { + if (typeof message.folderId === "number") + object.folderId = options.longs === String ? String(message.folderId) : message.folderId; + else + object.folderId = options.longs === String ? $util.Long.prototype.toString.call(message.folderId) : options.longs === Number ? new $util.LongBits(message.folderId.low >>> 0, message.folderId.high >>> 0).toNumber() : message.folderId; + if (options.oneofs) + object.location = "folderId"; + } + return object; + }; + + /** + * Converts this DataProfileLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @instance + * @returns {Object.} JSON object + */ + DataProfileLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileLocation"; + }; + + return DataProfileLocation; + })(); + + v2.DiscoveryConfig = (function() { + + /** + * Properties of a DiscoveryConfig. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryConfig + * @property {string|null} [name] DiscoveryConfig name + * @property {string|null} [displayName] DiscoveryConfig displayName + * @property {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null} [orgConfig] DiscoveryConfig orgConfig + * @property {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null} [otherCloudStartingLocation] DiscoveryConfig otherCloudStartingLocation + * @property {Array.|null} [inspectTemplates] DiscoveryConfig inspectTemplates + * @property {Array.|null} [actions] DiscoveryConfig actions + * @property {Array.|null} [targets] DiscoveryConfig targets + * @property {Array.|null} [errors] DiscoveryConfig errors + * @property {google.protobuf.ITimestamp|null} [createTime] DiscoveryConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryConfig updateTime + * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryConfig lastRunTime + * @property {google.privacy.dlp.v2.DiscoveryConfig.Status|null} [status] DiscoveryConfig status + */ + + /** + * Constructs a new DiscoveryConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryConfig. + * @implements IDiscoveryConfig + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryConfig=} [properties] Properties to set + */ + function DiscoveryConfig(properties) { + this.inspectTemplates = []; + this.actions = []; + this.targets = []; + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryConfig name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.name = ""; + + /** + * DiscoveryConfig displayName. + * @member {string} displayName + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.displayName = ""; + + /** + * DiscoveryConfig orgConfig. + * @member {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null|undefined} orgConfig + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.orgConfig = null; + + /** + * DiscoveryConfig otherCloudStartingLocation. + * @member {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null|undefined} otherCloudStartingLocation + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.otherCloudStartingLocation = null; + + /** + * DiscoveryConfig inspectTemplates. + * @member {Array.} inspectTemplates + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.inspectTemplates = $util.emptyArray; + + /** + * DiscoveryConfig actions. + * @member {Array.} actions + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.actions = $util.emptyArray; + + /** + * DiscoveryConfig targets. + * @member {Array.} targets + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.targets = $util.emptyArray; + + /** + * DiscoveryConfig errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.errors = $util.emptyArray; + + /** + * DiscoveryConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.createTime = null; + + /** + * DiscoveryConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.updateTime = null; + + /** + * DiscoveryConfig lastRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.lastRunTime = null; + + /** + * DiscoveryConfig status. + * @member {google.privacy.dlp.v2.DiscoveryConfig.Status} status + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.status = 0; + + /** + * Creates a new DiscoveryConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {google.privacy.dlp.v2.IDiscoveryConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig instance + */ + DiscoveryConfig.create = function create(properties) { + return new DiscoveryConfig(properties); + }; + + /** + * Encodes the specified DiscoveryConfig message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {google.privacy.dlp.v2.IDiscoveryConfig} message DiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.orgConfig != null && Object.hasOwnProperty.call(message, "orgConfig")) + $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.encode(message.orgConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inspectTemplates != null && message.inspectTemplates.length) + for (var i = 0; i < message.inspectTemplates.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.inspectTemplates[i]); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.privacy.dlp.v2.DataProfileAction.encode(message.actions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + $root.google.privacy.dlp.v2.DiscoveryTarget.encode(message.targets[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) + $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.status); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); + if (message.otherCloudStartingLocation != null && Object.hasOwnProperty.call(message, "otherCloudStartingLocation")) + $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.encode(message.otherCloudStartingLocation, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {google.privacy.dlp.v2.IDiscoveryConfig} message DiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 11: { + message.displayName = reader.string(); + break; + } + case 2: { + message.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.decode(reader, reader.uint32()); + break; + } + case 12: { + message.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.inspectTemplates && message.inspectTemplates.length)) + message.inspectTemplates = []; + message.inspectTemplates.push(reader.string()); + break; + } + case 4: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.privacy.dlp.v2.DataProfileAction.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.privacy.dlp.v2.DiscoveryTarget.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32())); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.status = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.orgConfig != null && message.hasOwnProperty("orgConfig")) { + var error = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify(message.orgConfig); + if (error) + return "orgConfig." + error; + } + if (message.otherCloudStartingLocation != null && message.hasOwnProperty("otherCloudStartingLocation")) { + var error = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify(message.otherCloudStartingLocation); + if (error) + return "otherCloudStartingLocation." + error; + } + if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { + if (!Array.isArray(message.inspectTemplates)) + return "inspectTemplates: array expected"; + for (var i = 0; i < message.inspectTemplates.length; ++i) + if (!$util.isString(message.inspectTemplates[i])) + return "inspectTemplates: string[] expected"; + } + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.privacy.dlp.v2.DataProfileAction.verify(message.actions[i]); + if (error) + return "actions." + error; + } + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) { + var error = $root.google.privacy.dlp.v2.DiscoveryTarget.verify(message.targets[i]); + if (error) + return "targets." + error; + } + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime); + if (error) + return "lastRunTime." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig + */ + DiscoveryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryConfig) + return object; + var message = new $root.google.privacy.dlp.v2.DiscoveryConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.orgConfig != null) { + if (typeof object.orgConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.orgConfig: object expected"); + message.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.fromObject(object.orgConfig); + } + if (object.otherCloudStartingLocation != null) { + if (typeof object.otherCloudStartingLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.otherCloudStartingLocation: object expected"); + message.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.fromObject(object.otherCloudStartingLocation); + } + if (object.inspectTemplates) { + if (!Array.isArray(object.inspectTemplates)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.inspectTemplates: array expected"); + message.inspectTemplates = []; + for (var i = 0; i < object.inspectTemplates.length; ++i) + message.inspectTemplates[i] = String(object.inspectTemplates[i]); + } + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.actions: object expected"); + message.actions[i] = $root.google.privacy.dlp.v2.DataProfileAction.fromObject(object.actions[i]); + } + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) { + if (typeof object.targets[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.targets: object expected"); + message.targets[i] = $root.google.privacy.dlp.v2.DiscoveryTarget.fromObject(object.targets[i]); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.lastRunTime != null) { + if (typeof object.lastRunTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.lastRunTime: object expected"); + message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime); + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "RUNNING": + case 1: + message.status = 1; + break; + case "PAUSED": + case 2: + message.status = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig} message DiscoveryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inspectTemplates = []; + object.actions = []; + object.targets = []; + object.errors = []; + } + if (options.defaults) { + object.name = ""; + object.orgConfig = null; + object.createTime = null; + object.updateTime = null; + object.lastRunTime = null; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.displayName = ""; + object.otherCloudStartingLocation = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.orgConfig != null && message.hasOwnProperty("orgConfig")) + object.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.toObject(message.orgConfig, options); + if (message.inspectTemplates && message.inspectTemplates.length) { + object.inspectTemplates = []; + for (var j = 0; j < message.inspectTemplates.length; ++j) + object.inspectTemplates[j] = message.inspectTemplates[j]; + } + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.privacy.dlp.v2.DataProfileAction.toObject(message.actions[j], options); + } + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = $root.google.privacy.dlp.v2.DiscoveryTarget.toObject(message.targets[j], options); + } + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) + object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryConfig.Status[message.status] === undefined ? message.status : $root.google.privacy.dlp.v2.DiscoveryConfig.Status[message.status] : message.status; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.otherCloudStartingLocation != null && message.hasOwnProperty("otherCloudStartingLocation")) + object.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.toObject(message.otherCloudStartingLocation, options); + return object; + }; + + /** + * Converts this DiscoveryConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + * @returns {Object.} JSON object + */ + DiscoveryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryConfig"; + }; + + DiscoveryConfig.OrgConfig = (function() { + + /** + * Properties of an OrgConfig. + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @interface IOrgConfig + * @property {google.privacy.dlp.v2.IDiscoveryStartingLocation|null} [location] OrgConfig location + * @property {string|null} [projectId] OrgConfig projectId + */ + + /** + * Constructs a new OrgConfig. + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @classdesc Represents an OrgConfig. + * @implements IOrgConfig + * @constructor + * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig=} [properties] Properties to set + */ + function OrgConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrgConfig location. + * @member {google.privacy.dlp.v2.IDiscoveryStartingLocation|null|undefined} location + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @instance + */ + OrgConfig.prototype.location = null; + + /** + * OrgConfig projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @instance + */ + OrgConfig.prototype.projectId = ""; + + /** + * Creates a new OrgConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig instance + */ + OrgConfig.create = function create(properties) { + return new OrgConfig(properties); + }; + + /** + * Encodes the specified OrgConfig message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig} message OrgConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrgConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.privacy.dlp.v2.DiscoveryStartingLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + return writer; + }; + + /** + * Encodes the specified OrgConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig} message OrgConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrgConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrgConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrgConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OrgConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrgConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrgConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrgConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.verify(message.location); + if (error) + return "location." + error; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates an OrgConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig + */ + OrgConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig) + return object; + var message = new $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.location: object expected"); + message.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.fromObject(object.location); + } + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from an OrgConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} message OrgConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrgConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.projectId = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.toObject(message.location, options); + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + return object; + }; + + /** + * Converts this OrgConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @instance + * @returns {Object.} JSON object + */ + OrgConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrgConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrgConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryConfig.OrgConfig"; + }; + + return OrgConfig; + })(); + + /** + * Status enum. + * @name google.privacy.dlp.v2.DiscoveryConfig.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} PAUSED=2 PAUSED value + */ + DiscoveryConfig.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "PAUSED"] = 2; + return values; + })(); + + return DiscoveryConfig; + })(); + + v2.DiscoveryTarget = (function() { + + /** + * Properties of a DiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryTarget + * @property {google.privacy.dlp.v2.IBigQueryDiscoveryTarget|null} [bigQueryTarget] DiscoveryTarget bigQueryTarget + * @property {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget|null} [cloudSqlTarget] DiscoveryTarget cloudSqlTarget + * @property {google.privacy.dlp.v2.ISecretsDiscoveryTarget|null} [secretsTarget] DiscoveryTarget secretsTarget + * @property {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null} [cloudStorageTarget] DiscoveryTarget cloudStorageTarget + * @property {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget|null} [otherCloudTarget] DiscoveryTarget otherCloudTarget + */ + + /** + * Constructs a new DiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryTarget. + * @implements IDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryTarget=} [properties] Properties to set + */ + function DiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryTarget bigQueryTarget. + * @member {google.privacy.dlp.v2.IBigQueryDiscoveryTarget|null|undefined} bigQueryTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.bigQueryTarget = null; + + /** + * DiscoveryTarget cloudSqlTarget. + * @member {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget|null|undefined} cloudSqlTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.cloudSqlTarget = null; + + /** + * DiscoveryTarget secretsTarget. + * @member {google.privacy.dlp.v2.ISecretsDiscoveryTarget|null|undefined} secretsTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.secretsTarget = null; + + /** + * DiscoveryTarget cloudStorageTarget. + * @member {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null|undefined} cloudStorageTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.cloudStorageTarget = null; + + /** + * DiscoveryTarget otherCloudTarget. + * @member {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget|null|undefined} otherCloudTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.otherCloudTarget = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryTarget target. + * @member {"bigQueryTarget"|"cloudSqlTarget"|"secretsTarget"|"cloudStorageTarget"|"otherCloudTarget"|undefined} target + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + Object.defineProperty(DiscoveryTarget.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["bigQueryTarget", "cloudSqlTarget", "secretsTarget", "cloudStorageTarget", "otherCloudTarget"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget instance + */ + DiscoveryTarget.create = function create(properties) { + return new DiscoveryTarget(properties); + }; + + /** + * Encodes the specified DiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTarget} message DiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigQueryTarget != null && Object.hasOwnProperty.call(message, "bigQueryTarget")) + $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.encode(message.bigQueryTarget, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudSqlTarget != null && Object.hasOwnProperty.call(message, "cloudSqlTarget")) + $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.encode(message.cloudSqlTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.secretsTarget != null && Object.hasOwnProperty.call(message, "secretsTarget")) + $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.encode(message.secretsTarget, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cloudStorageTarget != null && Object.hasOwnProperty.call(message, "cloudStorageTarget")) + $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.encode(message.cloudStorageTarget, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.otherCloudTarget != null && Object.hasOwnProperty.call(message, "otherCloudTarget")) + $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.encode(message.otherCloudTarget, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTarget} message DiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryTarget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.decode(reader, reader.uint32()); + break; + } + case 2: { + message.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.decode(reader, reader.uint32()); + break; + } + case 3: { + message.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.decode(reader, reader.uint32()); + break; + } + case 4: { + message.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.decode(reader, reader.uint32()); + break; + } + case 5: { + message.otherCloudTarget = $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryTarget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.bigQueryTarget != null && message.hasOwnProperty("bigQueryTarget")) { + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify(message.bigQueryTarget); + if (error) + return "bigQueryTarget." + error; + } + } + if (message.cloudSqlTarget != null && message.hasOwnProperty("cloudSqlTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify(message.cloudSqlTarget); + if (error) + return "cloudSqlTarget." + error; + } + } + if (message.secretsTarget != null && message.hasOwnProperty("secretsTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.verify(message.secretsTarget); + if (error) + return "secretsTarget." + error; + } + } + if (message.cloudStorageTarget != null && message.hasOwnProperty("cloudStorageTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify(message.cloudStorageTarget); + if (error) + return "cloudStorageTarget." + error; + } + } + if (message.otherCloudTarget != null && message.hasOwnProperty("otherCloudTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify(message.otherCloudTarget); + if (error) + return "otherCloudTarget." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget + */ + DiscoveryTarget.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryTarget) + return object; + var message = new $root.google.privacy.dlp.v2.DiscoveryTarget(); + if (object.bigQueryTarget != null) { + if (typeof object.bigQueryTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.bigQueryTarget: object expected"); + message.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.fromObject(object.bigQueryTarget); + } + if (object.cloudSqlTarget != null) { + if (typeof object.cloudSqlTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.cloudSqlTarget: object expected"); + message.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.fromObject(object.cloudSqlTarget); + } + if (object.secretsTarget != null) { + if (typeof object.secretsTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.secretsTarget: object expected"); + message.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.fromObject(object.secretsTarget); + } + if (object.cloudStorageTarget != null) { + if (typeof object.cloudStorageTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.cloudStorageTarget: object expected"); + message.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.fromObject(object.cloudStorageTarget); + } + if (object.otherCloudTarget != null) { + if (typeof object.otherCloudTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.otherCloudTarget: object expected"); + message.otherCloudTarget = $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.fromObject(object.otherCloudTarget); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.DiscoveryTarget} message DiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.bigQueryTarget != null && message.hasOwnProperty("bigQueryTarget")) { + object.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.toObject(message.bigQueryTarget, options); + if (options.oneofs) + object.target = "bigQueryTarget"; + } + if (message.cloudSqlTarget != null && message.hasOwnProperty("cloudSqlTarget")) { + object.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.toObject(message.cloudSqlTarget, options); + if (options.oneofs) + object.target = "cloudSqlTarget"; + } + if (message.secretsTarget != null && message.hasOwnProperty("secretsTarget")) { + object.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.toObject(message.secretsTarget, options); + if (options.oneofs) + object.target = "secretsTarget"; + } + if (message.cloudStorageTarget != null && message.hasOwnProperty("cloudStorageTarget")) { + object.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.toObject(message.cloudStorageTarget, options); + if (options.oneofs) + object.target = "cloudStorageTarget"; + } + if (message.otherCloudTarget != null && message.hasOwnProperty("otherCloudTarget")) { + object.otherCloudTarget = $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.toObject(message.otherCloudTarget, options); + if (options.oneofs) + object.target = "otherCloudTarget"; + } + return object; + }; + + /** + * Converts this DiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + DiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryTarget"; + }; + + return DiscoveryTarget; + })(); + + v2.BigQueryDiscoveryTarget = (function() { + + /** + * Properties of a BigQueryDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryDiscoveryTarget + * @property {google.privacy.dlp.v2.IDiscoveryBigQueryFilter|null} [filter] BigQueryDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryBigQueryConditions|null} [conditions] BigQueryDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryGenerationCadence|null} [cadence] BigQueryDiscoveryTarget cadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] BigQueryDiscoveryTarget disabled + */ + + /** + * Constructs a new BigQueryDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryDiscoveryTarget. + * @implements IBigQueryDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget=} [properties] Properties to set + */ + function BigQueryDiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryBigQueryFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + BigQueryDiscoveryTarget.prototype.filter = null; + + /** + * BigQueryDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryBigQueryConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + BigQueryDiscoveryTarget.prototype.conditions = null; + + /** + * BigQueryDiscoveryTarget cadence. + * @member {google.privacy.dlp.v2.IDiscoveryGenerationCadence|null|undefined} cadence + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + BigQueryDiscoveryTarget.prototype.cadence = null; + + /** + * BigQueryDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + BigQueryDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BigQueryDiscoveryTarget frequency. + * @member {"cadence"|"disabled"|undefined} frequency + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + Object.defineProperty(BigQueryDiscoveryTarget.prototype, "frequency", { + get: $util.oneOfGetter($oneOfFields = ["cadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BigQueryDiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget instance + */ + BigQueryDiscoveryTarget.create = function create(properties) { + return new BigQueryDiscoveryTarget(properties); + }; + + /** + * Encodes the specified BigQueryDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget} message BigQueryDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.encode(message.conditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cadence != null && Object.hasOwnProperty.call(message, "cadence")) + $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.encode(message.cadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget} message BigQueryDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDiscoveryTarget.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.decode(reader, reader.uint32()); + break; + } + case 2: { + message.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.decode(reader, reader.uint32()); + break; + } + case 3: { + message.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.decode(reader, reader.uint32()); + break; + } + case 4: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDiscoveryTarget.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify(message.filter); + if (error) + return "filter." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify(message.conditions); + if (error) + return "conditions." + error; + } + if (message.cadence != null && message.hasOwnProperty("cadence")) { + properties.frequency = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.verify(message.cadence); + if (error) + return "cadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.frequency === 1) + return "frequency: multiple values"; + properties.frequency = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled); + if (error) + return "disabled." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + */ + BigQueryDiscoveryTarget.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget) + return object; + var message = new $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget(); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.fromObject(object.filter); + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.fromObject(object.conditions); + } + if (object.cadence != null) { + if (typeof object.cadence !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.cadence: object expected"); + message.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.fromObject(object.cadence); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryDiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.BigQueryDiscoveryTarget} message BigQueryDiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = null; + object.conditions = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.toObject(message.filter, options); + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.toObject(message.conditions, options); + if (message.cadence != null && message.hasOwnProperty("cadence")) { + object.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.toObject(message.cadence, options); + if (options.oneofs) + object.frequency = "cadence"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.frequency = "disabled"; + } + return object; + }; + + /** + * Converts this BigQueryDiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + BigQueryDiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryDiscoveryTarget"; + }; + + return BigQueryDiscoveryTarget; + })(); + + v2.DiscoveryBigQueryFilter = (function() { + + /** + * Properties of a DiscoveryBigQueryFilter. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryBigQueryFilter + * @property {google.privacy.dlp.v2.IBigQueryTableCollection|null} [tables] DiscoveryBigQueryFilter tables + * @property {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables|null} [otherTables] DiscoveryBigQueryFilter otherTables + * @property {google.privacy.dlp.v2.ITableReference|null} [tableReference] DiscoveryBigQueryFilter tableReference + */ + + /** + * Constructs a new DiscoveryBigQueryFilter. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryBigQueryFilter. + * @implements IDiscoveryBigQueryFilter + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter=} [properties] Properties to set + */ + function DiscoveryBigQueryFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryBigQueryFilter tables. + * @member {google.privacy.dlp.v2.IBigQueryTableCollection|null|undefined} tables + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + */ + DiscoveryBigQueryFilter.prototype.tables = null; + + /** + * DiscoveryBigQueryFilter otherTables. + * @member {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables|null|undefined} otherTables + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + */ + DiscoveryBigQueryFilter.prototype.otherTables = null; + + /** + * DiscoveryBigQueryFilter tableReference. + * @member {google.privacy.dlp.v2.ITableReference|null|undefined} tableReference + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + */ + DiscoveryBigQueryFilter.prototype.tableReference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryBigQueryFilter filter. + * @member {"tables"|"otherTables"|"tableReference"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + */ + Object.defineProperty(DiscoveryBigQueryFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["tables", "otherTables", "tableReference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryBigQueryFilter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter instance + */ + DiscoveryBigQueryFilter.create = function create(properties) { + return new DiscoveryBigQueryFilter(properties); + }; + + /** + * Encodes the specified DiscoveryBigQueryFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter} message DiscoveryBigQueryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryBigQueryFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) + $root.google.privacy.dlp.v2.BigQueryTableCollection.encode(message.tables, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.otherTables != null && Object.hasOwnProperty.call(message, "otherTables")) + $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.encode(message.otherTables, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tableReference != null && Object.hasOwnProperty.call(message, "tableReference")) + $root.google.privacy.dlp.v2.TableReference.encode(message.tableReference, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryBigQueryFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter} message DiscoveryBigQueryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryBigQueryFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryBigQueryFilter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryBigQueryFilter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.decode(reader, reader.uint32()); + break; + } + case 2: { + message.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.decode(reader, reader.uint32()); + break; + } + case 3: { + message.tableReference = $root.google.privacy.dlp.v2.TableReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryBigQueryFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryBigQueryFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryBigQueryFilter message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryBigQueryFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.tables != null && message.hasOwnProperty("tables")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryTableCollection.verify(message.tables); + if (error) + return "tables." + error; + } + } + if (message.otherTables != null && message.hasOwnProperty("otherTables")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify(message.otherTables); + if (error) + return "otherTables." + error; + } + } + if (message.tableReference != null && message.hasOwnProperty("tableReference")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.TableReference.verify(message.tableReference); + if (error) + return "tableReference." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryBigQueryFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + */ + DiscoveryBigQueryFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter) + return object; + var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter(); + if (object.tables != null) { + if (typeof object.tables !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.tables: object expected"); + message.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.fromObject(object.tables); + } + if (object.otherTables != null) { + if (typeof object.otherTables !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.otherTables: object expected"); + message.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.fromObject(object.otherTables); + } + if (object.tableReference != null) { + if (typeof object.tableReference !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.tableReference: object expected"); + message.tableReference = $root.google.privacy.dlp.v2.TableReference.fromObject(object.tableReference); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryBigQueryFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter} message DiscoveryBigQueryFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryBigQueryFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.tables != null && message.hasOwnProperty("tables")) { + object.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.toObject(message.tables, options); + if (options.oneofs) + object.filter = "tables"; + } + if (message.otherTables != null && message.hasOwnProperty("otherTables")) { + object.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.toObject(message.otherTables, options); + if (options.oneofs) + object.filter = "otherTables"; + } + if (message.tableReference != null && message.hasOwnProperty("tableReference")) { + object.tableReference = $root.google.privacy.dlp.v2.TableReference.toObject(message.tableReference, options); + if (options.oneofs) + object.filter = "tableReference"; + } + return object; + }; + + /** + * Converts this DiscoveryBigQueryFilter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + * @returns {Object.} JSON object + */ + DiscoveryBigQueryFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryBigQueryFilter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryBigQueryFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryFilter"; + }; + + DiscoveryBigQueryFilter.AllOtherBigQueryTables = (function() { + + /** + * Properties of an AllOtherBigQueryTables. + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @interface IAllOtherBigQueryTables + */ + + /** + * Constructs a new AllOtherBigQueryTables. + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @classdesc Represents an AllOtherBigQueryTables. + * @implements IAllOtherBigQueryTables + * @constructor + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables=} [properties] Properties to set + */ + function AllOtherBigQueryTables(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AllOtherBigQueryTables instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables instance + */ + AllOtherBigQueryTables.create = function create(properties) { + return new AllOtherBigQueryTables(properties); + }; + + /** + * Encodes the specified AllOtherBigQueryTables message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables} message AllOtherBigQueryTables message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllOtherBigQueryTables.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AllOtherBigQueryTables message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables} message AllOtherBigQueryTables message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllOtherBigQueryTables.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllOtherBigQueryTables message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllOtherBigQueryTables.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllOtherBigQueryTables message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllOtherBigQueryTables.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllOtherBigQueryTables message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllOtherBigQueryTables.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an AllOtherBigQueryTables message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables + */ + AllOtherBigQueryTables.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables) + return object; + return new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables(); + }; + + /** + * Creates a plain object from an AllOtherBigQueryTables message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} message AllOtherBigQueryTables + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllOtherBigQueryTables.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AllOtherBigQueryTables to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @instance + * @returns {Object.} JSON object + */ + AllOtherBigQueryTables.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllOtherBigQueryTables + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllOtherBigQueryTables.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables"; + }; + + return AllOtherBigQueryTables; + })(); + + return DiscoveryBigQueryFilter; + })(); + + v2.BigQueryTableCollection = (function() { + + /** + * Properties of a BigQueryTableCollection. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryTableCollection + * @property {google.privacy.dlp.v2.IBigQueryRegexes|null} [includeRegexes] BigQueryTableCollection includeRegexes + */ + + /** + * Constructs a new BigQueryTableCollection. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryTableCollection. + * @implements IBigQueryTableCollection + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryTableCollection=} [properties] Properties to set + */ + function BigQueryTableCollection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableCollection includeRegexes. + * @member {google.privacy.dlp.v2.IBigQueryRegexes|null|undefined} includeRegexes + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @instance + */ + BigQueryTableCollection.prototype.includeRegexes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BigQueryTableCollection pattern. + * @member {"includeRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @instance + */ + Object.defineProperty(BigQueryTableCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BigQueryTableCollection instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection instance + */ + BigQueryTableCollection.create = function create(properties) { + return new BigQueryTableCollection(properties); + }; + + /** + * Encodes the specified BigQueryTableCollection message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableCollection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableCollection} message BigQueryTableCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) + $root.google.privacy.dlp.v2.BigQueryRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryTableCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableCollection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableCollection} message BigQueryTableCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableCollection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableCollection message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableCollection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryTableCollection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableCollection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableCollection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableCollection message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableCollection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryRegexes.verify(message.includeRegexes); + if (error) + return "includeRegexes." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryTableCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + */ + BigQueryTableCollection.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryTableCollection) + return object; + var message = new $root.google.privacy.dlp.v2.BigQueryTableCollection(); + if (object.includeRegexes != null) { + if (typeof object.includeRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryTableCollection.includeRegexes: object expected"); + message.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.fromObject(object.includeRegexes); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableCollection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {google.privacy.dlp.v2.BigQueryTableCollection} message BigQueryTableCollection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableCollection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + object.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.toObject(message.includeRegexes, options); + if (options.oneofs) + object.pattern = "includeRegexes"; + } + return object; + }; + + /** + * Converts this BigQueryTableCollection to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableCollection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTableCollection + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTableCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryTableCollection"; + }; + + return BigQueryTableCollection; + })(); + + v2.DiscoveryBigQueryConditions = (function() { + + /** + * Properties of a DiscoveryBigQueryConditions. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryBigQueryConditions + * @property {google.protobuf.ITimestamp|null} [createdAfter] DiscoveryBigQueryConditions createdAfter + * @property {google.privacy.dlp.v2.IBigQueryTableTypes|null} [types] DiscoveryBigQueryConditions types + * @property {google.privacy.dlp.v2.BigQueryTableTypeCollection|null} [typeCollection] DiscoveryBigQueryConditions typeCollection + * @property {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions|null} [orConditions] DiscoveryBigQueryConditions orConditions + */ + + /** + * Constructs a new DiscoveryBigQueryConditions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryBigQueryConditions. + * @implements IDiscoveryBigQueryConditions + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions=} [properties] Properties to set + */ + function DiscoveryBigQueryConditions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryBigQueryConditions createdAfter. + * @member {google.protobuf.ITimestamp|null|undefined} createdAfter + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + DiscoveryBigQueryConditions.prototype.createdAfter = null; + + /** + * DiscoveryBigQueryConditions types. + * @member {google.privacy.dlp.v2.IBigQueryTableTypes|null|undefined} types + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + DiscoveryBigQueryConditions.prototype.types = null; + + /** + * DiscoveryBigQueryConditions typeCollection. + * @member {google.privacy.dlp.v2.BigQueryTableTypeCollection|null|undefined} typeCollection + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + DiscoveryBigQueryConditions.prototype.typeCollection = null; + + /** + * DiscoveryBigQueryConditions orConditions. + * @member {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions|null|undefined} orConditions + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + DiscoveryBigQueryConditions.prototype.orConditions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryBigQueryConditions includedTypes. + * @member {"types"|"typeCollection"|undefined} includedTypes + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + Object.defineProperty(DiscoveryBigQueryConditions.prototype, "includedTypes", { + get: $util.oneOfGetter($oneOfFields = ["types", "typeCollection"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryBigQueryConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions instance + */ + DiscoveryBigQueryConditions.create = function create(properties) { + return new DiscoveryBigQueryConditions(properties); + }; + + /** + * Encodes the specified DiscoveryBigQueryConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions} message DiscoveryBigQueryConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryBigQueryConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createdAfter != null && Object.hasOwnProperty.call(message, "createdAfter")) + $root.google.protobuf.Timestamp.encode(message.createdAfter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.types != null && Object.hasOwnProperty.call(message, "types")) + $root.google.privacy.dlp.v2.BigQueryTableTypes.encode(message.types, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.typeCollection != null && Object.hasOwnProperty.call(message, "typeCollection")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.typeCollection); + if (message.orConditions != null && Object.hasOwnProperty.call(message, "orConditions")) + $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.encode(message.orConditions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryBigQueryConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions} message DiscoveryBigQueryConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryBigQueryConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryBigQueryConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryBigQueryConditions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createdAfter = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.decode(reader, reader.uint32()); + break; + } + case 3: { + message.typeCollection = reader.int32(); + break; + } + case 4: { + message.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryBigQueryConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryBigQueryConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryBigQueryConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryBigQueryConditions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) { + var error = $root.google.protobuf.Timestamp.verify(message.createdAfter); + if (error) + return "createdAfter." + error; + } + if (message.types != null && message.hasOwnProperty("types")) { + properties.includedTypes = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryTableTypes.verify(message.types); + if (error) + return "types." + error; + } + } + if (message.typeCollection != null && message.hasOwnProperty("typeCollection")) { + if (properties.includedTypes === 1) + return "includedTypes: multiple values"; + properties.includedTypes = 1; + switch (message.typeCollection) { + default: + return "typeCollection: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.orConditions != null && message.hasOwnProperty("orConditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify(message.orConditions); + if (error) + return "orConditions." + error; + } + return null; + }; + + /** + * Creates a DiscoveryBigQueryConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + */ + DiscoveryBigQueryConditions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions) + return object; + var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions(); + if (object.createdAfter != null) { + if (typeof object.createdAfter !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.createdAfter: object expected"); + message.createdAfter = $root.google.protobuf.Timestamp.fromObject(object.createdAfter); + } + if (object.types != null) { + if (typeof object.types !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.types: object expected"); + message.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.fromObject(object.types); + } + switch (object.typeCollection) { + default: + if (typeof object.typeCollection === "number") { + message.typeCollection = object.typeCollection; + break; + } + break; + case "BIG_QUERY_COLLECTION_UNSPECIFIED": + case 0: + message.typeCollection = 0; + break; + case "BIG_QUERY_COLLECTION_ALL_TYPES": + case 1: + message.typeCollection = 1; + break; + case "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES": + case 2: + message.typeCollection = 2; + break; + } + if (object.orConditions != null) { + if (typeof object.orConditions !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.orConditions: object expected"); + message.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.fromObject(object.orConditions); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryBigQueryConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions} message DiscoveryBigQueryConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryBigQueryConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createdAfter = null; + object.orConditions = null; + } + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) + object.createdAfter = $root.google.protobuf.Timestamp.toObject(message.createdAfter, options); + if (message.types != null && message.hasOwnProperty("types")) { + object.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.toObject(message.types, options); + if (options.oneofs) + object.includedTypes = "types"; + } + if (message.typeCollection != null && message.hasOwnProperty("typeCollection")) { + object.typeCollection = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableTypeCollection[message.typeCollection] === undefined ? message.typeCollection : $root.google.privacy.dlp.v2.BigQueryTableTypeCollection[message.typeCollection] : message.typeCollection; + if (options.oneofs) + object.includedTypes = "typeCollection"; + } + if (message.orConditions != null && message.hasOwnProperty("orConditions")) + object.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.toObject(message.orConditions, options); + return object; + }; + + /** + * Converts this DiscoveryBigQueryConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + * @returns {Object.} JSON object + */ + DiscoveryBigQueryConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryBigQueryConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryBigQueryConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryConditions"; + }; + + DiscoveryBigQueryConditions.OrConditions = (function() { + + /** + * Properties of an OrConditions. + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @interface IOrConditions + * @property {number|null} [minRowCount] OrConditions minRowCount + * @property {google.protobuf.IDuration|null} [minAge] OrConditions minAge + */ + + /** + * Constructs a new OrConditions. + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @classdesc Represents an OrConditions. + * @implements IOrConditions + * @constructor + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions=} [properties] Properties to set + */ + function OrConditions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrConditions minRowCount. + * @member {number} minRowCount + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @instance + */ + OrConditions.prototype.minRowCount = 0; + + /** + * OrConditions minAge. + * @member {google.protobuf.IDuration|null|undefined} minAge + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @instance + */ + OrConditions.prototype.minAge = null; + + /** + * Creates a new OrConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions instance + */ + OrConditions.create = function create(properties) { + return new OrConditions(properties); + }; + + /** + * Encodes the specified OrConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions} message OrConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minRowCount != null && Object.hasOwnProperty.call(message, "minRowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minRowCount); + if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) + $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OrConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions} message OrConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrConditions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.minRowCount = reader.int32(); + break; + } + case 2: { + message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a TagValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TagValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + } + return message; + }; - /** - * Verifies a TagValue message. - * @function verify - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TagValue.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.namespacedValue != null && message.hasOwnProperty("namespacedValue")) { - properties.format = 1; - if (!$util.isString(message.namespacedValue)) - return "namespacedValue: string expected"; - } - return null; - }; + /** + * Decodes an OrConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a TagValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue - */ - TagValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue) - return object; - var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue(); - if (object.namespacedValue != null) - message.namespacedValue = String(object.namespacedValue); - return message; - }; + /** + * Verifies an OrConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrConditions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minRowCount != null && message.hasOwnProperty("minRowCount")) + if (!$util.isInteger(message.minRowCount)) + return "minRowCount: integer expected"; + if (message.minAge != null && message.hasOwnProperty("minAge")) { + var error = $root.google.protobuf.Duration.verify(message.minAge); + if (error) + return "minAge." + error; + } + return null; + }; - /** - * Creates a plain object from a TagValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} message TagValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TagValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.namespacedValue != null && message.hasOwnProperty("namespacedValue")) { - object.namespacedValue = message.namespacedValue; - if (options.oneofs) - object.format = "namespacedValue"; - } + /** + * Creates an OrConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + */ + OrConditions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions) return object; - }; + var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions(); + if (object.minRowCount != null) + message.minRowCount = object.minRowCount | 0; + if (object.minAge != null) { + if (typeof object.minAge !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.minAge: object expected"); + message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge); + } + return message; + }; - /** - * Converts this TagValue to JSON. - * @function toJSON - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @instance - * @returns {Object.} JSON object - */ - TagValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an OrConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} message OrConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.minRowCount = 0; + object.minAge = null; + } + if (message.minRowCount != null && message.hasOwnProperty("minRowCount")) + object.minRowCount = message.minRowCount; + if (message.minAge != null && message.hasOwnProperty("minAge")) + object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); + return object; + }; - /** - * Gets the default type url for TagValue - * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TagValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue"; - }; + /** + * Converts this OrConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @instance + * @returns {Object.} JSON object + */ + OrConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return TagValue; - })(); + /** + * Gets the default type url for OrConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions"; + }; - return TagResources; + return OrConditions; })(); - return DataProfileAction; + return DiscoveryBigQueryConditions; })(); - v2.DataProfileJobConfig = (function() { + v2.DiscoveryGenerationCadence = (function() { /** - * Properties of a DataProfileJobConfig. + * Properties of a DiscoveryGenerationCadence. * @memberof google.privacy.dlp.v2 - * @interface IDataProfileJobConfig - * @property {google.privacy.dlp.v2.IDataProfileLocation|null} [location] DataProfileJobConfig location - * @property {string|null} [projectId] DataProfileJobConfig projectId - * @property {Array.|null} [inspectTemplates] DataProfileJobConfig inspectTemplates - * @property {Array.|null} [dataProfileActions] DataProfileJobConfig dataProfileActions + * @interface IDiscoveryGenerationCadence + * @property {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null} [schemaModifiedCadence] DiscoveryGenerationCadence schemaModifiedCadence + * @property {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null} [tableModifiedCadence] DiscoveryGenerationCadence tableModifiedCadence + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryGenerationCadence inspectTemplateModifiedCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryGenerationCadence refreshFrequency */ /** - * Constructs a new DataProfileJobConfig. + * Constructs a new DiscoveryGenerationCadence. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DataProfileJobConfig. - * @implements IDataProfileJobConfig + * @classdesc Represents a DiscoveryGenerationCadence. + * @implements IDiscoveryGenerationCadence * @constructor - * @param {google.privacy.dlp.v2.IDataProfileJobConfig=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence=} [properties] Properties to set */ - function DataProfileJobConfig(properties) { - this.inspectTemplates = []; - this.dataProfileActions = []; + function DiscoveryGenerationCadence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51671,123 +56445,117 @@ } /** - * DataProfileJobConfig location. - * @member {google.privacy.dlp.v2.IDataProfileLocation|null|undefined} location - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * DiscoveryGenerationCadence schemaModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null|undefined} schemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @instance */ - DataProfileJobConfig.prototype.location = null; + DiscoveryGenerationCadence.prototype.schemaModifiedCadence = null; /** - * DataProfileJobConfig projectId. - * @member {string} projectId - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * DiscoveryGenerationCadence tableModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null|undefined} tableModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @instance */ - DataProfileJobConfig.prototype.projectId = ""; + DiscoveryGenerationCadence.prototype.tableModifiedCadence = null; /** - * DataProfileJobConfig inspectTemplates. - * @member {Array.} inspectTemplates - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * DiscoveryGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @instance */ - DataProfileJobConfig.prototype.inspectTemplates = $util.emptyArray; + DiscoveryGenerationCadence.prototype.inspectTemplateModifiedCadence = null; /** - * DataProfileJobConfig dataProfileActions. - * @member {Array.} dataProfileActions - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * DiscoveryGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @instance */ - DataProfileJobConfig.prototype.dataProfileActions = $util.emptyArray; + DiscoveryGenerationCadence.prototype.refreshFrequency = 0; /** - * Creates a new DataProfileJobConfig instance using the specified properties. + * Creates a new DiscoveryGenerationCadence instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDataProfileJobConfig=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig instance + * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence instance */ - DataProfileJobConfig.create = function create(properties) { - return new DataProfileJobConfig(properties); + DiscoveryGenerationCadence.create = function create(properties) { + return new DiscoveryGenerationCadence(properties); }; /** - * Encodes the specified DataProfileJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileJobConfig.verify|verify} messages. + * Encodes the specified DiscoveryGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryGenerationCadence.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDataProfileJobConfig} message DataProfileJobConfig message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence} message DiscoveryGenerationCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataProfileJobConfig.encode = function encode(message, writer) { + DiscoveryGenerationCadence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.google.privacy.dlp.v2.DataProfileLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.projectId); - if (message.dataProfileActions != null && message.dataProfileActions.length) - for (var i = 0; i < message.dataProfileActions.length; ++i) - $root.google.privacy.dlp.v2.DataProfileAction.encode(message.dataProfileActions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.inspectTemplates != null && message.inspectTemplates.length) - for (var i = 0; i < message.inspectTemplates.length; ++i) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.inspectTemplates[i]); + if (message.schemaModifiedCadence != null && Object.hasOwnProperty.call(message, "schemaModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.encode(message.schemaModifiedCadence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tableModifiedCadence != null && Object.hasOwnProperty.call(message, "tableModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.encode(message.tableModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.refreshFrequency); return writer; }; /** - * Encodes the specified DataProfileJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileJobConfig.verify|verify} messages. + * Encodes the specified DiscoveryGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryGenerationCadence.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDataProfileJobConfig} message DataProfileJobConfig message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence} message DiscoveryGenerationCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataProfileJobConfig.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataProfileJobConfig message from the specified reader or buffer. + * Decodes a DiscoveryGenerationCadence message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataProfileJobConfig.decode = function decode(reader, length) { + DiscoveryGenerationCadence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileJobConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryGenerationCadence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.location = $root.google.privacy.dlp.v2.DataProfileLocation.decode(reader, reader.uint32()); + message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.decode(reader, reader.uint32()); break; } - case 5: { - message.projectId = reader.string(); + case 2: { + message.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.decode(reader, reader.uint32()); break; } - case 7: { - if (!(message.inspectTemplates && message.inspectTemplates.length)) - message.inspectTemplates = []; - message.inspectTemplates.push(reader.string()); + case 3: { + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32()); break; } - case 6: { - if (!(message.dataProfileActions && message.dataProfileActions.length)) - message.dataProfileActions = []; - message.dataProfileActions.push($root.google.privacy.dlp.v2.DataProfileAction.decode(reader, reader.uint32())); + case 4: { + message.refreshFrequency = reader.int32(); break; } default: @@ -51799,185 +56567,193 @@ }; /** - * Decodes a DataProfileJobConfig message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryGenerationCadence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataProfileJobConfig.decodeDelimited = function decodeDelimited(reader) { + DiscoveryGenerationCadence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataProfileJobConfig message. + * Verifies a DiscoveryGenerationCadence message. * @function verify - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataProfileJobConfig.verify = function verify(message) { + DiscoveryGenerationCadence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.google.privacy.dlp.v2.DataProfileLocation.verify(message.location); + if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify(message.schemaModifiedCadence); if (error) - return "location." + error; + return "schemaModifiedCadence." + error; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { - if (!Array.isArray(message.inspectTemplates)) - return "inspectTemplates: array expected"; - for (var i = 0; i < message.inspectTemplates.length; ++i) - if (!$util.isString(message.inspectTemplates[i])) - return "inspectTemplates: string[] expected"; + if (message.tableModifiedCadence != null && message.hasOwnProperty("tableModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify(message.tableModifiedCadence); + if (error) + return "tableModifiedCadence." + error; } - if (message.dataProfileActions != null && message.hasOwnProperty("dataProfileActions")) { - if (!Array.isArray(message.dataProfileActions)) - return "dataProfileActions: array expected"; - for (var i = 0; i < message.dataProfileActions.length; ++i) { - var error = $root.google.privacy.dlp.v2.DataProfileAction.verify(message.dataProfileActions[i]); - if (error) - return "dataProfileActions." + error; - } + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence); + if (error) + return "inspectTemplateModifiedCadence." + error; } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { + default: + return "refreshFrequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } return null; }; /** - * Creates a DataProfileJobConfig message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryGenerationCadence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence */ - DataProfileJobConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DataProfileJobConfig) + DiscoveryGenerationCadence.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryGenerationCadence) return object; - var message = new $root.google.privacy.dlp.v2.DataProfileJobConfig(); - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.location: object expected"); - message.location = $root.google.privacy.dlp.v2.DataProfileLocation.fromObject(object.location); + var message = new $root.google.privacy.dlp.v2.DiscoveryGenerationCadence(); + if (object.schemaModifiedCadence != null) { + if (typeof object.schemaModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.schemaModifiedCadence: object expected"); + message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.fromObject(object.schemaModifiedCadence); } - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.inspectTemplates) { - if (!Array.isArray(object.inspectTemplates)) - throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.inspectTemplates: array expected"); - message.inspectTemplates = []; - for (var i = 0; i < object.inspectTemplates.length; ++i) - message.inspectTemplates[i] = String(object.inspectTemplates[i]); + if (object.tableModifiedCadence != null) { + if (typeof object.tableModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.tableModifiedCadence: object expected"); + message.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.fromObject(object.tableModifiedCadence); } - if (object.dataProfileActions) { - if (!Array.isArray(object.dataProfileActions)) - throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.dataProfileActions: array expected"); - message.dataProfileActions = []; - for (var i = 0; i < object.dataProfileActions.length; ++i) { - if (typeof object.dataProfileActions[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.dataProfileActions: object expected"); - message.dataProfileActions[i] = $root.google.privacy.dlp.v2.DataProfileAction.fromObject(object.dataProfileActions[i]); + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence); + } + switch (object.refreshFrequency) { + default: + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; + break; } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.refreshFrequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.refreshFrequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; + break; } return message; }; /** - * Creates a plain object from a DataProfileJobConfig message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryGenerationCadence message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static - * @param {google.privacy.dlp.v2.DataProfileJobConfig} message DataProfileJobConfig + * @param {google.privacy.dlp.v2.DiscoveryGenerationCadence} message DiscoveryGenerationCadence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataProfileJobConfig.toObject = function toObject(message, options) { + DiscoveryGenerationCadence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dataProfileActions = []; - object.inspectTemplates = []; - } if (options.defaults) { - object.location = null; - object.projectId = ""; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = $root.google.privacy.dlp.v2.DataProfileLocation.toObject(message.location, options); - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.dataProfileActions && message.dataProfileActions.length) { - object.dataProfileActions = []; - for (var j = 0; j < message.dataProfileActions.length; ++j) - object.dataProfileActions[j] = $root.google.privacy.dlp.v2.DataProfileAction.toObject(message.dataProfileActions[j], options); - } - if (message.inspectTemplates && message.inspectTemplates.length) { - object.inspectTemplates = []; - for (var j = 0; j < message.inspectTemplates.length; ++j) - object.inspectTemplates[j] = message.inspectTemplates[j]; + object.schemaModifiedCadence = null; + object.tableModifiedCadence = null; + object.inspectTemplateModifiedCadence = null; + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; } + if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) + object.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.toObject(message.schemaModifiedCadence, options); + if (message.tableModifiedCadence != null && message.hasOwnProperty("tableModifiedCadence")) + object.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.toObject(message.tableModifiedCadence, options); + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; return object; }; /** - * Converts this DataProfileJobConfig to JSON. + * Converts this DiscoveryGenerationCadence to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @instance * @returns {Object.} JSON object */ - DataProfileJobConfig.prototype.toJSON = function toJSON() { + DiscoveryGenerationCadence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataProfileJobConfig + * Gets the default type url for DiscoveryGenerationCadence * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataProfileJobConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileJobConfig"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryGenerationCadence"; }; - return DataProfileJobConfig; + return DiscoveryGenerationCadence; })(); - v2.BigQueryRegex = (function() { + v2.DiscoveryTableModifiedCadence = (function() { /** - * Properties of a BigQueryRegex. + * Properties of a DiscoveryTableModifiedCadence. * @memberof google.privacy.dlp.v2 - * @interface IBigQueryRegex - * @property {string|null} [projectIdRegex] BigQueryRegex projectIdRegex - * @property {string|null} [datasetIdRegex] BigQueryRegex datasetIdRegex - * @property {string|null} [tableIdRegex] BigQueryRegex tableIdRegex + * @interface IDiscoveryTableModifiedCadence + * @property {Array.|null} [types] DiscoveryTableModifiedCadence types + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoveryTableModifiedCadence frequency */ /** - * Constructs a new BigQueryRegex. + * Constructs a new DiscoveryTableModifiedCadence. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a BigQueryRegex. - * @implements IBigQueryRegex + * @classdesc Represents a DiscoveryTableModifiedCadence. + * @implements IDiscoveryTableModifiedCadence * @constructor - * @param {google.privacy.dlp.v2.IBigQueryRegex=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence=} [properties] Properties to set */ - function BigQueryRegex(properties) { + function DiscoveryTableModifiedCadence(properties) { + this.types = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -51985,103 +56761,100 @@ } /** - * BigQueryRegex projectIdRegex. - * @member {string} projectIdRegex - * @memberof google.privacy.dlp.v2.BigQueryRegex - * @instance - */ - BigQueryRegex.prototype.projectIdRegex = ""; - - /** - * BigQueryRegex datasetIdRegex. - * @member {string} datasetIdRegex - * @memberof google.privacy.dlp.v2.BigQueryRegex + * DiscoveryTableModifiedCadence types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @instance */ - BigQueryRegex.prototype.datasetIdRegex = ""; + DiscoveryTableModifiedCadence.prototype.types = $util.emptyArray; /** - * BigQueryRegex tableIdRegex. - * @member {string} tableIdRegex - * @memberof google.privacy.dlp.v2.BigQueryRegex + * DiscoveryTableModifiedCadence frequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @instance */ - BigQueryRegex.prototype.tableIdRegex = ""; + DiscoveryTableModifiedCadence.prototype.frequency = 0; /** - * Creates a new BigQueryRegex instance using the specified properties. + * Creates a new DiscoveryTableModifiedCadence instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryRegex=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex instance + * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence instance */ - BigQueryRegex.create = function create(properties) { - return new BigQueryRegex(properties); + DiscoveryTableModifiedCadence.create = function create(properties) { + return new DiscoveryTableModifiedCadence(properties); }; /** - * Encodes the specified BigQueryRegex message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegex.verify|verify} messages. + * Encodes the specified DiscoveryTableModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryRegex} message BigQueryRegex message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryRegex.encode = function encode(message, writer) { + DiscoveryTableModifiedCadence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); - if (message.datasetIdRegex != null && Object.hasOwnProperty.call(message, "datasetIdRegex")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetIdRegex); - if (message.tableIdRegex != null && Object.hasOwnProperty.call(message, "tableIdRegex")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableIdRegex); + if (message.types != null && message.types.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); return writer; }; /** - * Encodes the specified BigQueryRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegex.verify|verify} messages. + * Encodes the specified DiscoveryTableModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryRegex} message BigQueryRegex message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryRegex.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryTableModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryRegex message from the specified reader or buffer. + * Decodes a DiscoveryTableModifiedCadence message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryRegex.decode = function decode(reader, length) { + DiscoveryTableModifiedCadence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryRegex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.projectIdRegex = reader.string(); + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); break; } case 2: { - message.datasetIdRegex = reader.string(); - break; - } - case 3: { - message.tableIdRegex = reader.string(); + message.frequency = reader.int32(); break; } default: @@ -52093,140 +56866,207 @@ }; /** - * Decodes a BigQueryRegex message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryTableModifiedCadence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryRegex.decodeDelimited = function decodeDelimited(reader) { + DiscoveryTableModifiedCadence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryRegex message. + * Verifies a DiscoveryTableModifiedCadence message. * @function verify - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryRegex.verify = function verify(message) { + DiscoveryTableModifiedCadence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) - if (!$util.isString(message.projectIdRegex)) - return "projectIdRegex: string expected"; - if (message.datasetIdRegex != null && message.hasOwnProperty("datasetIdRegex")) - if (!$util.isString(message.datasetIdRegex)) - return "datasetIdRegex: string expected"; - if (message.tableIdRegex != null && message.hasOwnProperty("tableIdRegex")) - if (!$util.isString(message.tableIdRegex)) - return "tableIdRegex: string expected"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + break; + } + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } return null; }; /** - * Creates a BigQueryRegex message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryTableModifiedCadence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence */ - BigQueryRegex.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.BigQueryRegex) + DiscoveryTableModifiedCadence.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence) return object; - var message = new $root.google.privacy.dlp.v2.BigQueryRegex(); - if (object.projectIdRegex != null) - message.projectIdRegex = String(object.projectIdRegex); - if (object.datasetIdRegex != null) - message.datasetIdRegex = String(object.datasetIdRegex); - if (object.tableIdRegex != null) - message.tableIdRegex = String(object.tableIdRegex); + var message = new $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence(); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryTableModifiedCadence.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "TABLE_MODIFICATION_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "TABLE_MODIFIED_TIMESTAMP": + case 1: + message.types[i] = 1; + break; + } + } + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.frequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.frequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.frequency = 4; + break; + } return message; }; /** - * Creates a plain object from a BigQueryRegex message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryTableModifiedCadence message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static - * @param {google.privacy.dlp.v2.BigQueryRegex} message BigQueryRegex + * @param {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryRegex.toObject = function toObject(message, options) { + DiscoveryTableModifiedCadence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.projectIdRegex = ""; - object.datasetIdRegex = ""; - object.tableIdRegex = ""; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) + object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQueryTableModification[message.types[j]] : message.types[j]; } - if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) - object.projectIdRegex = message.projectIdRegex; - if (message.datasetIdRegex != null && message.hasOwnProperty("datasetIdRegex")) - object.datasetIdRegex = message.datasetIdRegex; - if (message.tableIdRegex != null && message.hasOwnProperty("tableIdRegex")) - object.tableIdRegex = message.tableIdRegex; + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; return object; }; /** - * Converts this BigQueryRegex to JSON. + * Converts this DiscoveryTableModifiedCadence to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @instance * @returns {Object.} JSON object */ - BigQueryRegex.prototype.toJSON = function toJSON() { + DiscoveryTableModifiedCadence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryRegex + * Gets the default type url for DiscoveryTableModifiedCadence * @function getTypeUrl - * @memberof google.privacy.dlp.v2.BigQueryRegex + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryTableModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryRegex"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryTableModifiedCadence"; }; - return BigQueryRegex; + return DiscoveryTableModifiedCadence; })(); - v2.BigQueryRegexes = (function() { + /** + * BigQueryTableModification enum. + * @name google.privacy.dlp.v2.BigQueryTableModification + * @enum {number} + * @property {number} TABLE_MODIFICATION_UNSPECIFIED=0 TABLE_MODIFICATION_UNSPECIFIED value + * @property {number} TABLE_MODIFIED_TIMESTAMP=1 TABLE_MODIFIED_TIMESTAMP value + */ + v2.BigQueryTableModification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TABLE_MODIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE_MODIFIED_TIMESTAMP"] = 1; + return values; + })(); + + v2.DiscoverySchemaModifiedCadence = (function() { /** - * Properties of a BigQueryRegexes. + * Properties of a DiscoverySchemaModifiedCadence. * @memberof google.privacy.dlp.v2 - * @interface IBigQueryRegexes - * @property {Array.|null} [patterns] BigQueryRegexes patterns + * @interface IDiscoverySchemaModifiedCadence + * @property {Array.|null} [types] DiscoverySchemaModifiedCadence types + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoverySchemaModifiedCadence frequency */ /** - * Constructs a new BigQueryRegexes. + * Constructs a new DiscoverySchemaModifiedCadence. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a BigQueryRegexes. - * @implements IBigQueryRegexes + * @classdesc Represents a DiscoverySchemaModifiedCadence. + * @implements IDiscoverySchemaModifiedCadence * @constructor - * @param {google.privacy.dlp.v2.IBigQueryRegexes=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence=} [properties] Properties to set */ - function BigQueryRegexes(properties) { - this.patterns = []; + function DiscoverySchemaModifiedCadence(properties) { + this.types = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52234,78 +57074,100 @@ } /** - * BigQueryRegexes patterns. - * @member {Array.} patterns - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * DiscoverySchemaModifiedCadence types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @instance */ - BigQueryRegexes.prototype.patterns = $util.emptyArray; + DiscoverySchemaModifiedCadence.prototype.types = $util.emptyArray; /** - * Creates a new BigQueryRegexes instance using the specified properties. + * DiscoverySchemaModifiedCadence frequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @instance + */ + DiscoverySchemaModifiedCadence.prototype.frequency = 0; + + /** + * Creates a new DiscoverySchemaModifiedCadence instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryRegexes=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes instance + * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence instance */ - BigQueryRegexes.create = function create(properties) { - return new BigQueryRegexes(properties); + DiscoverySchemaModifiedCadence.create = function create(properties) { + return new DiscoverySchemaModifiedCadence(properties); }; /** - * Encodes the specified BigQueryRegexes message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegexes.verify|verify} messages. + * Encodes the specified DiscoverySchemaModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryRegexes} message BigQueryRegexes message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryRegexes.encode = function encode(message, writer) { + DiscoverySchemaModifiedCadence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.patterns != null && message.patterns.length) - for (var i = 0; i < message.patterns.length; ++i) - $root.google.privacy.dlp.v2.BigQueryRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.types != null && message.types.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); return writer; }; /** - * Encodes the specified BigQueryRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegexes.verify|verify} messages. + * Encodes the specified DiscoverySchemaModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryRegexes} message BigQueryRegexes message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryRegexes.encodeDelimited = function encodeDelimited(message, writer) { + DiscoverySchemaModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryRegexes message from the specified reader or buffer. + * Decodes a DiscoverySchemaModifiedCadence message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryRegexes.decode = function decode(reader, length) { + DiscoverySchemaModifiedCadence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryRegexes(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.patterns && message.patterns.length)) - message.patterns = []; - message.patterns.push($root.google.privacy.dlp.v2.BigQueryRegex.decode(reader, reader.uint32())); + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); + break; + } + case 2: { + message.frequency = reader.int32(); break; } default: @@ -52317,140 +57179,212 @@ }; /** - * Decodes a BigQueryRegexes message from the specified reader or buffer, length delimited. + * Decodes a DiscoverySchemaModifiedCadence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryRegexes.decodeDelimited = function decodeDelimited(reader) { + DiscoverySchemaModifiedCadence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryRegexes message. + * Verifies a DiscoverySchemaModifiedCadence message. * @function verify - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryRegexes.verify = function verify(message) { + DiscoverySchemaModifiedCadence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.patterns != null && message.hasOwnProperty("patterns")) { - if (!Array.isArray(message.patterns)) - return "patterns: array expected"; - for (var i = 0; i < message.patterns.length; ++i) { - var error = $root.google.privacy.dlp.v2.BigQueryRegex.verify(message.patterns[i]); - if (error) - return "patterns." + error; - } + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } return null; }; /** - * Creates a BigQueryRegexes message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoverySchemaModifiedCadence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence */ - BigQueryRegexes.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.BigQueryRegexes) + DiscoverySchemaModifiedCadence.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence) return object; - var message = new $root.google.privacy.dlp.v2.BigQueryRegexes(); - if (object.patterns) { - if (!Array.isArray(object.patterns)) - throw TypeError(".google.privacy.dlp.v2.BigQueryRegexes.patterns: array expected"); - message.patterns = []; - for (var i = 0; i < object.patterns.length; ++i) { - if (typeof object.patterns[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.BigQueryRegexes.patterns: object expected"); - message.patterns[i] = $root.google.privacy.dlp.v2.BigQueryRegex.fromObject(object.patterns[i]); + var message = new $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence(); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "SCHEMA_MODIFICATION_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "SCHEMA_NEW_COLUMNS": + case 1: + message.types[i] = 1; + break; + case "SCHEMA_REMOVED_COLUMNS": + case 2: + message.types[i] = 2; + break; + } + } + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.frequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.frequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.frequency = 4; + break; } return message; }; /** - * Creates a plain object from a BigQueryRegexes message. Also converts values to other types if specified. + * Creates a plain object from a DiscoverySchemaModifiedCadence message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static - * @param {google.privacy.dlp.v2.BigQueryRegexes} message BigQueryRegexes + * @param {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryRegexes.toObject = function toObject(message, options) { + DiscoverySchemaModifiedCadence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.patterns = []; - if (message.patterns && message.patterns.length) { - object.patterns = []; - for (var j = 0; j < message.patterns.length; ++j) - object.patterns[j] = $root.google.privacy.dlp.v2.BigQueryRegex.toObject(message.patterns[j], options); + object.types = []; + if (options.defaults) + object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQuerySchemaModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQuerySchemaModification[message.types[j]] : message.types[j]; } + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; return object; }; /** - * Converts this BigQueryRegexes to JSON. + * Converts this DiscoverySchemaModifiedCadence to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @instance * @returns {Object.} JSON object */ - BigQueryRegexes.prototype.toJSON = function toJSON() { + DiscoverySchemaModifiedCadence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryRegexes + * Gets the default type url for DiscoverySchemaModifiedCadence * @function getTypeUrl - * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoverySchemaModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryRegexes"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoverySchemaModifiedCadence"; }; - return BigQueryRegexes; + return DiscoverySchemaModifiedCadence; })(); - v2.BigQueryTableTypes = (function() { + /** + * BigQuerySchemaModification enum. + * @name google.privacy.dlp.v2.BigQuerySchemaModification + * @enum {number} + * @property {number} SCHEMA_MODIFICATION_UNSPECIFIED=0 SCHEMA_MODIFICATION_UNSPECIFIED value + * @property {number} SCHEMA_NEW_COLUMNS=1 SCHEMA_NEW_COLUMNS value + * @property {number} SCHEMA_REMOVED_COLUMNS=2 SCHEMA_REMOVED_COLUMNS value + */ + v2.BigQuerySchemaModification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCHEMA_MODIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEMA_NEW_COLUMNS"] = 1; + values[valuesById[2] = "SCHEMA_REMOVED_COLUMNS"] = 2; + return values; + })(); + + v2.DiscoveryInspectTemplateModifiedCadence = (function() { /** - * Properties of a BigQueryTableTypes. + * Properties of a DiscoveryInspectTemplateModifiedCadence. * @memberof google.privacy.dlp.v2 - * @interface IBigQueryTableTypes - * @property {Array.|null} [types] BigQueryTableTypes types + * @interface IDiscoveryInspectTemplateModifiedCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoveryInspectTemplateModifiedCadence frequency */ /** - * Constructs a new BigQueryTableTypes. + * Constructs a new DiscoveryInspectTemplateModifiedCadence. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a BigQueryTableTypes. - * @implements IBigQueryTableTypes + * @classdesc Represents a DiscoveryInspectTemplateModifiedCadence. + * @implements IDiscoveryInspectTemplateModifiedCadence * @constructor - * @param {google.privacy.dlp.v2.IBigQueryTableTypes=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence=} [properties] Properties to set */ - function BigQueryTableTypes(properties) { - this.types = []; + function DiscoveryInspectTemplateModifiedCadence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52458,86 +57392,75 @@ } /** - * BigQueryTableTypes types. - * @member {Array.} types - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * DiscoveryInspectTemplateModifiedCadence frequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @instance */ - BigQueryTableTypes.prototype.types = $util.emptyArray; + DiscoveryInspectTemplateModifiedCadence.prototype.frequency = 0; /** - * Creates a new BigQueryTableTypes instance using the specified properties. + * Creates a new DiscoveryInspectTemplateModifiedCadence instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryTableTypes=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes instance + * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence instance */ - BigQueryTableTypes.create = function create(properties) { - return new BigQueryTableTypes(properties); + DiscoveryInspectTemplateModifiedCadence.create = function create(properties) { + return new DiscoveryInspectTemplateModifiedCadence(properties); }; /** - * Encodes the specified BigQueryTableTypes message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableTypes.verify|verify} messages. + * Encodes the specified DiscoveryInspectTemplateModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryTableTypes} message BigQueryTableTypes message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryTableTypes.encode = function encode(message, writer) { + DiscoveryInspectTemplateModifiedCadence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.types != null && message.types.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.types.length; ++i) - writer.int32(message.types[i]); - writer.ldelim(); - } + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.frequency); return writer; }; /** - * Encodes the specified BigQueryTableTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableTypes.verify|verify} messages. + * Encodes the specified DiscoveryInspectTemplateModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static - * @param {google.privacy.dlp.v2.IBigQueryTableTypes} message BigQueryTableTypes message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryTableTypes.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryInspectTemplateModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryTableTypes message from the specified reader or buffer. + * Decodes a DiscoveryInspectTemplateModifiedCadence message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryTableTypes.decode = function decode(reader, length) { + DiscoveryInspectTemplateModifiedCadence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryTableTypes(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.types && message.types.length)) - message.types = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.types.push(reader.int32()); - } else - message.types.push(reader.int32()); + message.frequency = reader.int32(); break; } default: @@ -52549,207 +57472,154 @@ }; /** - * Decodes a BigQueryTableTypes message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryInspectTemplateModifiedCadence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryTableTypes.decodeDelimited = function decodeDelimited(reader) { + DiscoveryInspectTemplateModifiedCadence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryTableTypes message. + * Verifies a DiscoveryInspectTemplateModifiedCadence message. * @function verify - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryTableTypes.verify = function verify(message) { + DiscoveryInspectTemplateModifiedCadence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - switch (message.types[i]) { - default: - return "types: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } return null; }; /** - * Creates a BigQueryTableTypes message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryInspectTemplateModifiedCadence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence */ - BigQueryTableTypes.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.BigQueryTableTypes) + DiscoveryInspectTemplateModifiedCadence.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence) return object; - var message = new $root.google.privacy.dlp.v2.BigQueryTableTypes(); - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.privacy.dlp.v2.BigQueryTableTypes.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - switch (object.types[i]) { - default: - if (typeof object.types[i] === "number") { - message.types[i] = object.types[i]; - break; - } - case "BIG_QUERY_TABLE_TYPE_UNSPECIFIED": - case 0: - message.types[i] = 0; - break; - case "BIG_QUERY_TABLE_TYPE_TABLE": - case 1: - message.types[i] = 1; - break; - case "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE": - case 2: - message.types[i] = 2; - break; - } + var message = new $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence(); + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.frequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.frequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.frequency = 4; + break; } return message; }; /** - * Creates a plain object from a BigQueryTableTypes message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryInspectTemplateModifiedCadence message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static - * @param {google.privacy.dlp.v2.BigQueryTableTypes} message BigQueryTableTypes + * @param {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryTableTypes.toObject = function toObject(message, options) { + DiscoveryInspectTemplateModifiedCadence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.types = []; - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableType[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQueryTableType[message.types[j]] : message.types[j]; - } + if (options.defaults) + object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; return object; }; /** - * Converts this BigQueryTableTypes to JSON. + * Converts this DiscoveryInspectTemplateModifiedCadence to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @instance * @returns {Object.} JSON object */ - BigQueryTableTypes.prototype.toJSON = function toJSON() { + DiscoveryInspectTemplateModifiedCadence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryTableTypes + * Gets the default type url for DiscoveryInspectTemplateModifiedCadence * @function getTypeUrl - * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryTableTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryInspectTemplateModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryTableTypes"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence"; }; - return BigQueryTableTypes; - })(); - - /** - * BigQueryTableTypeCollection enum. - * @name google.privacy.dlp.v2.BigQueryTableTypeCollection - * @enum {number} - * @property {number} BIG_QUERY_COLLECTION_UNSPECIFIED=0 BIG_QUERY_COLLECTION_UNSPECIFIED value - * @property {number} BIG_QUERY_COLLECTION_ALL_TYPES=1 BIG_QUERY_COLLECTION_ALL_TYPES value - * @property {number} BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES=2 BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES value - */ - v2.BigQueryTableTypeCollection = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BIG_QUERY_COLLECTION_UNSPECIFIED"] = 0; - values[valuesById[1] = "BIG_QUERY_COLLECTION_ALL_TYPES"] = 1; - values[valuesById[2] = "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES"] = 2; - return values; - })(); - - /** - * BigQueryTableType enum. - * @name google.privacy.dlp.v2.BigQueryTableType - * @enum {number} - * @property {number} BIG_QUERY_TABLE_TYPE_UNSPECIFIED=0 BIG_QUERY_TABLE_TYPE_UNSPECIFIED value - * @property {number} BIG_QUERY_TABLE_TYPE_TABLE=1 BIG_QUERY_TABLE_TYPE_TABLE value - * @property {number} BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE=2 BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE value - */ - v2.BigQueryTableType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BIG_QUERY_TABLE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BIG_QUERY_TABLE_TYPE_TABLE"] = 1; - values[valuesById[2] = "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE"] = 2; - return values; - })(); - - /** - * DataProfileUpdateFrequency enum. - * @name google.privacy.dlp.v2.DataProfileUpdateFrequency - * @enum {number} - * @property {number} UPDATE_FREQUENCY_UNSPECIFIED=0 UPDATE_FREQUENCY_UNSPECIFIED value - * @property {number} UPDATE_FREQUENCY_NEVER=1 UPDATE_FREQUENCY_NEVER value - * @property {number} UPDATE_FREQUENCY_DAILY=2 UPDATE_FREQUENCY_DAILY value - * @property {number} UPDATE_FREQUENCY_MONTHLY=4 UPDATE_FREQUENCY_MONTHLY value - */ - v2.DataProfileUpdateFrequency = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UPDATE_FREQUENCY_UNSPECIFIED"] = 0; - values[valuesById[1] = "UPDATE_FREQUENCY_NEVER"] = 1; - values[valuesById[2] = "UPDATE_FREQUENCY_DAILY"] = 2; - values[valuesById[4] = "UPDATE_FREQUENCY_MONTHLY"] = 4; - return values; + return DiscoveryInspectTemplateModifiedCadence; })(); - v2.Disabled = (function() { + v2.CloudSqlDiscoveryTarget = (function() { /** - * Properties of a Disabled. + * Properties of a CloudSqlDiscoveryTarget. * @memberof google.privacy.dlp.v2 - * @interface IDisabled + * @interface ICloudSqlDiscoveryTarget + * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter|null} [filter] CloudSqlDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions|null} [conditions] CloudSqlDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence|null} [generationCadence] CloudSqlDiscoveryTarget generationCadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] CloudSqlDiscoveryTarget disabled */ /** - * Constructs a new Disabled. + * Constructs a new CloudSqlDiscoveryTarget. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a Disabled. - * @implements IDisabled + * @classdesc Represents a CloudSqlDiscoveryTarget. + * @implements ICloudSqlDiscoveryTarget * @constructor - * @param {google.privacy.dlp.v2.IDisabled=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget=} [properties] Properties to set */ - function Disabled(properties) { + function CloudSqlDiscoveryTarget(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52757,63 +57627,133 @@ } /** - * Creates a new Disabled instance using the specified properties. + * CloudSqlDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + CloudSqlDiscoveryTarget.prototype.filter = null; + + /** + * CloudSqlDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + CloudSqlDiscoveryTarget.prototype.conditions = null; + + /** + * CloudSqlDiscoveryTarget generationCadence. + * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence|null|undefined} generationCadence + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + CloudSqlDiscoveryTarget.prototype.generationCadence = null; + + /** + * CloudSqlDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + CloudSqlDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudSqlDiscoveryTarget cadence. + * @member {"generationCadence"|"disabled"|undefined} cadence + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + Object.defineProperty(CloudSqlDiscoveryTarget.prototype, "cadence", { + get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudSqlDiscoveryTarget instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDisabled=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.Disabled} Disabled instance + * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget instance */ - Disabled.create = function create(properties) { - return new Disabled(properties); + CloudSqlDiscoveryTarget.create = function create(properties) { + return new CloudSqlDiscoveryTarget(properties); }; /** - * Encodes the specified Disabled message. Does not implicitly {@link google.privacy.dlp.v2.Disabled.verify|verify} messages. + * Encodes the specified CloudSqlDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDisabled} message Disabled message or plain object to encode + * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Disabled.encode = function encode(message, writer) { + CloudSqlDiscoveryTarget.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.encode(message.conditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) + $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified Disabled message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Disabled.verify|verify} messages. + * Encodes the specified CloudSqlDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDisabled} message Disabled message or plain object to encode + * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Disabled.encodeDelimited = function encodeDelimited(message, writer) { + CloudSqlDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Disabled message from the specified reader or buffer. + * Decodes a CloudSqlDiscoveryTarget message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.Disabled} Disabled + * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Disabled.decode = function decode(reader, length) { + CloudSqlDiscoveryTarget.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Disabled(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.decode(reader, reader.uint32()); + break; + } + case 2: { + message.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.decode(reader, reader.uint32()); + break; + } + case 3: { + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.decode(reader, reader.uint32()); + break; + } + case 4: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -52823,110 +57763,182 @@ }; /** - * Decodes a Disabled message from the specified reader or buffer, length delimited. + * Decodes a CloudSqlDiscoveryTarget message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.Disabled} Disabled + * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Disabled.decodeDelimited = function decodeDelimited(reader) { + CloudSqlDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Disabled message. + * Verifies a CloudSqlDiscoveryTarget message. * @function verify - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Disabled.verify = function verify(message) { + CloudSqlDiscoveryTarget.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify(message.filter); + if (error) + return "filter." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify(message.conditions); + if (error) + return "conditions." + error; + } + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify(message.generationCadence); + if (error) + return "generationCadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.cadence === 1) + return "cadence: multiple values"; + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled); + if (error) + return "disabled." + error; + } + } return null; }; /** - * Creates a Disabled message from a plain object. Also converts values to their respective internal types. + * Creates a CloudSqlDiscoveryTarget message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.Disabled} Disabled + * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget */ - Disabled.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.Disabled) + CloudSqlDiscoveryTarget.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget) return object; - return new $root.google.privacy.dlp.v2.Disabled(); + var message = new $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget(); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.fromObject(object.filter); + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.fromObject(object.conditions); + } + if (object.generationCadence != null) { + if (typeof object.generationCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.generationCadence: object expected"); + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.fromObject(object.generationCadence); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled); + } + return message; }; /** - * Creates a plain object from a Disabled message. Also converts values to other types if specified. + * Creates a plain object from a CloudSqlDiscoveryTarget message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.Disabled} message Disabled + * @param {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Disabled.toObject = function toObject() { - return {}; + CloudSqlDiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = null; + object.conditions = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.toObject(message.filter, options); + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.toObject(message.conditions, options); + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.toObject(message.generationCadence, options); + if (options.oneofs) + object.cadence = "generationCadence"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.cadence = "disabled"; + } + return object; }; /** - * Converts this Disabled to JSON. + * Converts this CloudSqlDiscoveryTarget to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @instance * @returns {Object.} JSON object */ - Disabled.prototype.toJSON = function toJSON() { + CloudSqlDiscoveryTarget.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Disabled + * Gets the default type url for CloudSqlDiscoveryTarget * @function getTypeUrl - * @memberof google.privacy.dlp.v2.Disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Disabled.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudSqlDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.Disabled"; + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudSqlDiscoveryTarget"; }; - return Disabled; + return CloudSqlDiscoveryTarget; })(); - v2.DataProfileLocation = (function() { + v2.DiscoveryCloudSqlFilter = (function() { /** - * Properties of a DataProfileLocation. + * Properties of a DiscoveryCloudSqlFilter. * @memberof google.privacy.dlp.v2 - * @interface IDataProfileLocation - * @property {number|Long|null} [organizationId] DataProfileLocation organizationId - * @property {number|Long|null} [folderId] DataProfileLocation folderId + * @interface IDiscoveryCloudSqlFilter + * @property {google.privacy.dlp.v2.IDatabaseResourceCollection|null} [collection] DiscoveryCloudSqlFilter collection + * @property {google.privacy.dlp.v2.IAllOtherDatabaseResources|null} [others] DiscoveryCloudSqlFilter others + * @property {google.privacy.dlp.v2.IDatabaseResourceReference|null} [databaseResourceReference] DiscoveryCloudSqlFilter databaseResourceReference */ /** - * Constructs a new DataProfileLocation. + * Constructs a new DiscoveryCloudSqlFilter. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DataProfileLocation. - * @implements IDataProfileLocation + * @classdesc Represents a DiscoveryCloudSqlFilter. + * @implements IDiscoveryCloudSqlFilter * @constructor - * @param {google.privacy.dlp.v2.IDataProfileLocation=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter=} [properties] Properties to set */ - function DataProfileLocation(properties) { + function DiscoveryCloudSqlFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -52934,103 +57946,117 @@ } /** - * DataProfileLocation organizationId. - * @member {number|Long|null|undefined} organizationId - * @memberof google.privacy.dlp.v2.DataProfileLocation + * DiscoveryCloudSqlFilter collection. + * @member {google.privacy.dlp.v2.IDatabaseResourceCollection|null|undefined} collection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @instance */ - DataProfileLocation.prototype.organizationId = null; + DiscoveryCloudSqlFilter.prototype.collection = null; /** - * DataProfileLocation folderId. - * @member {number|Long|null|undefined} folderId - * @memberof google.privacy.dlp.v2.DataProfileLocation + * DiscoveryCloudSqlFilter others. + * @member {google.privacy.dlp.v2.IAllOtherDatabaseResources|null|undefined} others + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @instance */ - DataProfileLocation.prototype.folderId = null; + DiscoveryCloudSqlFilter.prototype.others = null; + + /** + * DiscoveryCloudSqlFilter databaseResourceReference. + * @member {google.privacy.dlp.v2.IDatabaseResourceReference|null|undefined} databaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @instance + */ + DiscoveryCloudSqlFilter.prototype.databaseResourceReference = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * DataProfileLocation location. - * @member {"organizationId"|"folderId"|undefined} location - * @memberof google.privacy.dlp.v2.DataProfileLocation + * DiscoveryCloudSqlFilter filter. + * @member {"collection"|"others"|"databaseResourceReference"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @instance */ - Object.defineProperty(DataProfileLocation.prototype, "location", { - get: $util.oneOfGetter($oneOfFields = ["organizationId", "folderId"]), + Object.defineProperty(DiscoveryCloudSqlFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["collection", "others", "databaseResourceReference"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DataProfileLocation instance using the specified properties. + * Creates a new DiscoveryCloudSqlFilter instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static - * @param {google.privacy.dlp.v2.IDataProfileLocation=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation instance + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter instance */ - DataProfileLocation.create = function create(properties) { - return new DataProfileLocation(properties); + DiscoveryCloudSqlFilter.create = function create(properties) { + return new DiscoveryCloudSqlFilter(properties); }; /** - * Encodes the specified DataProfileLocation message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileLocation.verify|verify} messages. + * Encodes the specified DiscoveryCloudSqlFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static - * @param {google.privacy.dlp.v2.IDataProfileLocation} message DataProfileLocation message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataProfileLocation.encode = function encode(message, writer) { + DiscoveryCloudSqlFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.organizationId); - if (message.folderId != null && Object.hasOwnProperty.call(message, "folderId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.folderId); + if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) + $root.google.privacy.dlp.v2.DatabaseResourceCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.others != null && Object.hasOwnProperty.call(message, "others")) + $root.google.privacy.dlp.v2.AllOtherDatabaseResources.encode(message.others, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.databaseResourceReference != null && Object.hasOwnProperty.call(message, "databaseResourceReference")) + $root.google.privacy.dlp.v2.DatabaseResourceReference.encode(message.databaseResourceReference, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DataProfileLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileLocation.verify|verify} messages. + * Encodes the specified DiscoveryCloudSqlFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static - * @param {google.privacy.dlp.v2.IDataProfileLocation} message DataProfileLocation message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DataProfileLocation.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryCloudSqlFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DataProfileLocation message from the specified reader or buffer. + * Decodes a DiscoveryCloudSqlFilter message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataProfileLocation.decode = function decode(reader, length) { + DiscoveryCloudSqlFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileLocation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.organizationId = reader.int64(); + message.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.decode(reader, reader.uint32()); break; } case 2: { - message.folderId = reader.int64(); + message.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.decode(reader, reader.uint32()); + break; + } + case 3: { + message.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.decode(reader, reader.uint32()); break; } default: @@ -53042,174 +58068,172 @@ }; /** - * Decodes a DataProfileLocation message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryCloudSqlFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DataProfileLocation.decodeDelimited = function decodeDelimited(reader) { + DiscoveryCloudSqlFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DataProfileLocation message. + * Verifies a DiscoveryCloudSqlFilter message. * @function verify - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DataProfileLocation.verify = function verify(message) { + DiscoveryCloudSqlFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.organizationId != null && message.hasOwnProperty("organizationId")) { - properties.location = 1; - if (!$util.isInteger(message.organizationId) && !(message.organizationId && $util.isInteger(message.organizationId.low) && $util.isInteger(message.organizationId.high))) - return "organizationId: integer|Long expected"; + if (message.collection != null && message.hasOwnProperty("collection")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.DatabaseResourceCollection.verify(message.collection); + if (error) + return "collection." + error; + } } - if (message.folderId != null && message.hasOwnProperty("folderId")) { - if (properties.location === 1) - return "location: multiple values"; - properties.location = 1; - if (!$util.isInteger(message.folderId) && !(message.folderId && $util.isInteger(message.folderId.low) && $util.isInteger(message.folderId.high))) - return "folderId: integer|Long expected"; + if (message.others != null && message.hasOwnProperty("others")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.verify(message.others); + if (error) + return "others." + error; + } + } + if (message.databaseResourceReference != null && message.hasOwnProperty("databaseResourceReference")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.DatabaseResourceReference.verify(message.databaseResourceReference); + if (error) + return "databaseResourceReference." + error; + } } return null; }; /** - * Creates a DataProfileLocation message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryCloudSqlFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter */ - DataProfileLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DataProfileLocation) + DiscoveryCloudSqlFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter) return object; - var message = new $root.google.privacy.dlp.v2.DataProfileLocation(); - if (object.organizationId != null) - if ($util.Long) - (message.organizationId = $util.Long.fromValue(object.organizationId)).unsigned = false; - else if (typeof object.organizationId === "string") - message.organizationId = parseInt(object.organizationId, 10); - else if (typeof object.organizationId === "number") - message.organizationId = object.organizationId; - else if (typeof object.organizationId === "object") - message.organizationId = new $util.LongBits(object.organizationId.low >>> 0, object.organizationId.high >>> 0).toNumber(); - if (object.folderId != null) - if ($util.Long) - (message.folderId = $util.Long.fromValue(object.folderId)).unsigned = false; - else if (typeof object.folderId === "string") - message.folderId = parseInt(object.folderId, 10); - else if (typeof object.folderId === "number") - message.folderId = object.folderId; - else if (typeof object.folderId === "object") - message.folderId = new $util.LongBits(object.folderId.low >>> 0, object.folderId.high >>> 0).toNumber(); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter(); + if (object.collection != null) { + if (typeof object.collection !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.collection: object expected"); + message.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.fromObject(object.collection); + } + if (object.others != null) { + if (typeof object.others !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.others: object expected"); + message.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.fromObject(object.others); + } + if (object.databaseResourceReference != null) { + if (typeof object.databaseResourceReference !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.databaseResourceReference: object expected"); + message.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.fromObject(object.databaseResourceReference); + } return message; }; /** - * Creates a plain object from a DataProfileLocation message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryCloudSqlFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static - * @param {google.privacy.dlp.v2.DataProfileLocation} message DataProfileLocation + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DataProfileLocation.toObject = function toObject(message, options) { + DiscoveryCloudSqlFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.organizationId != null && message.hasOwnProperty("organizationId")) { - if (typeof message.organizationId === "number") - object.organizationId = options.longs === String ? String(message.organizationId) : message.organizationId; - else - object.organizationId = options.longs === String ? $util.Long.prototype.toString.call(message.organizationId) : options.longs === Number ? new $util.LongBits(message.organizationId.low >>> 0, message.organizationId.high >>> 0).toNumber() : message.organizationId; + if (message.collection != null && message.hasOwnProperty("collection")) { + object.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.toObject(message.collection, options); if (options.oneofs) - object.location = "organizationId"; + object.filter = "collection"; } - if (message.folderId != null && message.hasOwnProperty("folderId")) { - if (typeof message.folderId === "number") - object.folderId = options.longs === String ? String(message.folderId) : message.folderId; - else - object.folderId = options.longs === String ? $util.Long.prototype.toString.call(message.folderId) : options.longs === Number ? new $util.LongBits(message.folderId.low >>> 0, message.folderId.high >>> 0).toNumber() : message.folderId; + if (message.others != null && message.hasOwnProperty("others")) { + object.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.toObject(message.others, options); if (options.oneofs) - object.location = "folderId"; + object.filter = "others"; + } + if (message.databaseResourceReference != null && message.hasOwnProperty("databaseResourceReference")) { + object.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.toObject(message.databaseResourceReference, options); + if (options.oneofs) + object.filter = "databaseResourceReference"; } return object; }; /** - * Converts this DataProfileLocation to JSON. + * Converts this DiscoveryCloudSqlFilter to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @instance * @returns {Object.} JSON object */ - DataProfileLocation.prototype.toJSON = function toJSON() { + DiscoveryCloudSqlFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DataProfileLocation + * Gets the default type url for DiscoveryCloudSqlFilter * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DataProfileLocation + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DataProfileLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryCloudSqlFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileLocation"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlFilter"; }; - return DataProfileLocation; + return DiscoveryCloudSqlFilter; })(); - v2.DiscoveryConfig = (function() { + v2.DatabaseResourceCollection = (function() { /** - * Properties of a DiscoveryConfig. + * Properties of a DatabaseResourceCollection. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryConfig - * @property {string|null} [name] DiscoveryConfig name - * @property {string|null} [displayName] DiscoveryConfig displayName - * @property {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null} [orgConfig] DiscoveryConfig orgConfig - * @property {Array.|null} [inspectTemplates] DiscoveryConfig inspectTemplates - * @property {Array.|null} [actions] DiscoveryConfig actions - * @property {Array.|null} [targets] DiscoveryConfig targets - * @property {Array.|null} [errors] DiscoveryConfig errors - * @property {google.protobuf.ITimestamp|null} [createTime] DiscoveryConfig createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryConfig updateTime - * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryConfig lastRunTime - * @property {google.privacy.dlp.v2.DiscoveryConfig.Status|null} [status] DiscoveryConfig status + * @interface IDatabaseResourceCollection + * @property {google.privacy.dlp.v2.IDatabaseResourceRegexes|null} [includeRegexes] DatabaseResourceCollection includeRegexes */ /** - * Constructs a new DiscoveryConfig. + * Constructs a new DatabaseResourceCollection. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryConfig. - * @implements IDiscoveryConfig + * @classdesc Represents a DatabaseResourceCollection. + * @implements IDatabaseResourceCollection * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryConfig=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDatabaseResourceCollection=} [properties] Properties to set */ - function DiscoveryConfig(properties) { - this.inspectTemplates = []; - this.actions = []; - this.targets = []; - this.errors = []; + function DatabaseResourceCollection(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -53217,227 +58241,89 @@ } /** - * DiscoveryConfig name. - * @member {string} name - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.name = ""; - - /** - * DiscoveryConfig displayName. - * @member {string} displayName - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.displayName = ""; - - /** - * DiscoveryConfig orgConfig. - * @member {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null|undefined} orgConfig - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.orgConfig = null; - - /** - * DiscoveryConfig inspectTemplates. - * @member {Array.} inspectTemplates - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.inspectTemplates = $util.emptyArray; - - /** - * DiscoveryConfig actions. - * @member {Array.} actions - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.actions = $util.emptyArray; - - /** - * DiscoveryConfig targets. - * @member {Array.} targets - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.targets = $util.emptyArray; - - /** - * DiscoveryConfig errors. - * @member {Array.} errors - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.errors = $util.emptyArray; - - /** - * DiscoveryConfig createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.createTime = null; - - /** - * DiscoveryConfig updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * DatabaseResourceCollection includeRegexes. + * @member {google.privacy.dlp.v2.IDatabaseResourceRegexes|null|undefined} includeRegexes + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @instance */ - DiscoveryConfig.prototype.updateTime = null; + DatabaseResourceCollection.prototype.includeRegexes = null; - /** - * DiscoveryConfig lastRunTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @instance - */ - DiscoveryConfig.prototype.lastRunTime = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DiscoveryConfig status. - * @member {google.privacy.dlp.v2.DiscoveryConfig.Status} status - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * DatabaseResourceCollection pattern. + * @member {"includeRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @instance */ - DiscoveryConfig.prototype.status = 0; + Object.defineProperty(DatabaseResourceCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DiscoveryConfig instance using the specified properties. + * Creates a new DatabaseResourceCollection instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @static - * @param {google.privacy.dlp.v2.IDiscoveryConfig=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig instance - */ - DiscoveryConfig.create = function create(properties) { - return new DiscoveryConfig(properties); - }; - - /** - * Encodes the specified DiscoveryConfig message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.verify|verify} messages. - * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @static - * @param {google.privacy.dlp.v2.IDiscoveryConfig} message DiscoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DiscoveryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.orgConfig != null && Object.hasOwnProperty.call(message, "orgConfig")) - $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.encode(message.orgConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inspectTemplates != null && message.inspectTemplates.length) - for (var i = 0; i < message.inspectTemplates.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.inspectTemplates[i]); - if (message.actions != null && message.actions.length) - for (var i = 0; i < message.actions.length; ++i) - $root.google.privacy.dlp.v2.DataProfileAction.encode(message.actions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - $root.google.privacy.dlp.v2.DiscoveryTarget.encode(message.targets[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) - $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.status != null && Object.hasOwnProperty.call(message, "status")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.status); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection instance + */ + DatabaseResourceCollection.create = function create(properties) { + return new DatabaseResourceCollection(properties); + }; + + /** + * Encodes the specified DatabaseResourceCollection message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceCollection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceCollection} message DatabaseResourceCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) + $root.google.privacy.dlp.v2.DatabaseResourceRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.verify|verify} messages. + * Encodes the specified DatabaseResourceCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceCollection.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @static - * @param {google.privacy.dlp.v2.IDiscoveryConfig} message DiscoveryConfig message or plain object to encode + * @param {google.privacy.dlp.v2.IDatabaseResourceCollection} message DatabaseResourceCollection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { + DatabaseResourceCollection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryConfig message from the specified reader or buffer. + * Decodes a DatabaseResourceCollection message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig + * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryConfig.decode = function decode(reader, length) { + DatabaseResourceCollection.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceCollection(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 11: { - message.displayName = reader.string(); - break; - } - case 2: { - message.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.inspectTemplates && message.inspectTemplates.length)) - message.inspectTemplates = []; - message.inspectTemplates.push(reader.string()); - break; - } - case 4: { - if (!(message.actions && message.actions.length)) - message.actions = []; - message.actions.push($root.google.privacy.dlp.v2.DataProfileAction.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.targets && message.targets.length)) - message.targets = []; - message.targets.push($root.google.privacy.dlp.v2.DiscoveryTarget.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32())); - break; - } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.status = reader.int32(); + message.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.decode(reader, reader.uint32()); break; } default: @@ -53449,563 +58335,359 @@ }; /** - * Decodes a DiscoveryConfig message from the specified reader or buffer, length delimited. + * Decodes a DatabaseResourceCollection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig + * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { + DatabaseResourceCollection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryConfig message. + * Verifies a DatabaseResourceCollection message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryConfig.verify = function verify(message) { + DatabaseResourceCollection.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.orgConfig != null && message.hasOwnProperty("orgConfig")) { - var error = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify(message.orgConfig); - if (error) - return "orgConfig." + error; - } - if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { - if (!Array.isArray(message.inspectTemplates)) - return "inspectTemplates: array expected"; - for (var i = 0; i < message.inspectTemplates.length; ++i) - if (!$util.isString(message.inspectTemplates[i])) - return "inspectTemplates: string[] expected"; - } - if (message.actions != null && message.hasOwnProperty("actions")) { - if (!Array.isArray(message.actions)) - return "actions: array expected"; - for (var i = 0; i < message.actions.length; ++i) { - var error = $root.google.privacy.dlp.v2.DataProfileAction.verify(message.actions[i]); - if (error) - return "actions." + error; - } - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) { - var error = $root.google.privacy.dlp.v2.DiscoveryTarget.verify(message.targets[i]); - if (error) - return "targets." + error; - } - } - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime); - if (error) - return "lastRunTime." + error; - } - if (message.status != null && message.hasOwnProperty("status")) - switch (message.status) { - default: - return "status: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a DiscoveryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig - */ - DiscoveryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryConfig) - return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryConfig(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.orgConfig != null) { - if (typeof object.orgConfig !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.orgConfig: object expected"); - message.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.fromObject(object.orgConfig); - } - if (object.inspectTemplates) { - if (!Array.isArray(object.inspectTemplates)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.inspectTemplates: array expected"); - message.inspectTemplates = []; - for (var i = 0; i < object.inspectTemplates.length; ++i) - message.inspectTemplates[i] = String(object.inspectTemplates[i]); - } - if (object.actions) { - if (!Array.isArray(object.actions)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.actions: array expected"); - message.actions = []; - for (var i = 0; i < object.actions.length; ++i) { - if (typeof object.actions[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.actions: object expected"); - message.actions[i] = $root.google.privacy.dlp.v2.DataProfileAction.fromObject(object.actions[i]); - } - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) { - if (typeof object.targets[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.targets: object expected"); - message.targets[i] = $root.google.privacy.dlp.v2.DiscoveryTarget.fromObject(object.targets[i]); - } - } - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.errors: object expected"); - message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.lastRunTime != null) { - if (typeof object.lastRunTime !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.lastRunTime: object expected"); - message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime); - } - switch (object.status) { - default: - if (typeof object.status === "number") { - message.status = object.status; - break; + var properties = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.verify(message.includeRegexes); + if (error) + return "includeRegexes." + error; } - break; - case "STATUS_UNSPECIFIED": - case 0: - message.status = 0; - break; - case "RUNNING": - case 1: - message.status = 1; - break; - case "PAUSED": - case 2: - message.status = 2; - break; + } + return null; + }; + + /** + * Creates a DatabaseResourceCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection + */ + DatabaseResourceCollection.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceCollection) + return object; + var message = new $root.google.privacy.dlp.v2.DatabaseResourceCollection(); + if (object.includeRegexes != null) { + if (typeof object.includeRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.DatabaseResourceCollection.includeRegexes: object expected"); + message.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.fromObject(object.includeRegexes); } return message; }; /** - * Creates a plain object from a DiscoveryConfig message. Also converts values to other types if specified. + * Creates a plain object from a DatabaseResourceCollection message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @static - * @param {google.privacy.dlp.v2.DiscoveryConfig} message DiscoveryConfig + * @param {google.privacy.dlp.v2.DatabaseResourceCollection} message DatabaseResourceCollection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryConfig.toObject = function toObject(message, options) { + DatabaseResourceCollection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.inspectTemplates = []; - object.actions = []; - object.targets = []; - object.errors = []; - } - if (options.defaults) { - object.name = ""; - object.orgConfig = null; - object.createTime = null; - object.updateTime = null; - object.lastRunTime = null; - object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.orgConfig != null && message.hasOwnProperty("orgConfig")) - object.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.toObject(message.orgConfig, options); - if (message.inspectTemplates && message.inspectTemplates.length) { - object.inspectTemplates = []; - for (var j = 0; j < message.inspectTemplates.length; ++j) - object.inspectTemplates[j] = message.inspectTemplates[j]; - } - if (message.actions && message.actions.length) { - object.actions = []; - for (var j = 0; j < message.actions.length; ++j) - object.actions[j] = $root.google.privacy.dlp.v2.DataProfileAction.toObject(message.actions[j], options); - } - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = $root.google.privacy.dlp.v2.DiscoveryTarget.toObject(message.targets[j], options); - } - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + object.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.toObject(message.includeRegexes, options); + if (options.oneofs) + object.pattern = "includeRegexes"; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) - object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); - if (message.status != null && message.hasOwnProperty("status")) - object.status = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryConfig.Status[message.status] === undefined ? message.status : $root.google.privacy.dlp.v2.DiscoveryConfig.Status[message.status] : message.status; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this DiscoveryConfig to JSON. + * Converts this DatabaseResourceCollection to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @instance * @returns {Object.} JSON object */ - DiscoveryConfig.prototype.toJSON = function toJSON() { + DatabaseResourceCollection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryConfig + * Gets the default type url for DatabaseResourceCollection * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DatabaseResourceCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryConfig"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceCollection"; }; - DiscoveryConfig.OrgConfig = (function() { + return DatabaseResourceCollection; + })(); - /** - * Properties of an OrgConfig. - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @interface IOrgConfig - * @property {google.privacy.dlp.v2.IDiscoveryStartingLocation|null} [location] OrgConfig location - * @property {string|null} [projectId] OrgConfig projectId - */ + v2.DatabaseResourceRegexes = (function() { - /** - * Constructs a new OrgConfig. - * @memberof google.privacy.dlp.v2.DiscoveryConfig - * @classdesc Represents an OrgConfig. - * @implements IOrgConfig - * @constructor - * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig=} [properties] Properties to set - */ - function OrgConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a DatabaseResourceRegexes. + * @memberof google.privacy.dlp.v2 + * @interface IDatabaseResourceRegexes + * @property {Array.|null} [patterns] DatabaseResourceRegexes patterns + */ - /** - * OrgConfig location. - * @member {google.privacy.dlp.v2.IDiscoveryStartingLocation|null|undefined} location - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @instance - */ - OrgConfig.prototype.location = null; + /** + * Constructs a new DatabaseResourceRegexes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DatabaseResourceRegexes. + * @implements IDatabaseResourceRegexes + * @constructor + * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes=} [properties] Properties to set + */ + function DatabaseResourceRegexes(properties) { + this.patterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * OrgConfig projectId. - * @member {string} projectId - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @instance - */ - OrgConfig.prototype.projectId = ""; + /** + * DatabaseResourceRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @instance + */ + DatabaseResourceRegexes.prototype.patterns = $util.emptyArray; - /** - * Creates a new OrgConfig instance using the specified properties. - * @function create - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig instance - */ - OrgConfig.create = function create(properties) { - return new OrgConfig(properties); - }; + /** + * Creates a new DatabaseResourceRegexes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes instance + */ + DatabaseResourceRegexes.create = function create(properties) { + return new DatabaseResourceRegexes(properties); + }; - /** - * Encodes the specified OrgConfig message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify|verify} messages. - * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig} message OrgConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrgConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.google.privacy.dlp.v2.DiscoveryStartingLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); - return writer; - }; + /** + * Encodes the specified DatabaseResourceRegexes message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegexes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes} message DatabaseResourceRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceRegexes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.DatabaseResourceRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Encodes the specified OrgConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig} message OrgConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OrgConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified DatabaseResourceRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegexes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes} message DatabaseResourceRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceRegexes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes an OrgConfig message from the specified reader or buffer. - * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrgConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.decode(reader, reader.uint32()); - break; - } - case 2: { - message.projectId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Decodes a DatabaseResourceRegexes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceRegexes.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceRegexes(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.DatabaseResourceRegex.decode(reader, reader.uint32())); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; + } + return message; + }; - /** - * Decodes an OrgConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OrgConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a DatabaseResourceRegexes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceRegexes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies an OrgConfig message. - * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OrgConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.verify(message.location); + /** + * Verifies a DatabaseResourceRegexes message. + * @function verify + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseResourceRegexes.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.DatabaseResourceRegex.verify(message.patterns[i]); if (error) - return "location." + error; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - return null; - }; - - /** - * Creates an OrgConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig - */ - OrgConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig) - return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig(); - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.location: object expected"); - message.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.fromObject(object.location); + return "patterns." + error; } - if (object.projectId != null) - message.projectId = String(object.projectId); - return message; - }; + } + return null; + }; - /** - * Creates a plain object from an OrgConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} message OrgConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OrgConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.location = null; - object.projectId = ""; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.toObject(message.location, options); - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; + /** + * Creates a DatabaseResourceRegexes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + */ + DatabaseResourceRegexes.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceRegexes) return object; - }; - - /** - * Converts this OrgConfig to JSON. - * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @instance - * @returns {Object.} JSON object - */ - OrgConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OrgConfig - * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OrgConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + var message = new $root.google.privacy.dlp.v2.DatabaseResourceRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.DatabaseResourceRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DatabaseResourceRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.DatabaseResourceRegex.fromObject(object.patterns[i]); } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryConfig.OrgConfig"; - }; + } + return message; + }; - return OrgConfig; - })(); + /** + * Creates a plain object from a DatabaseResourceRegexes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {google.privacy.dlp.v2.DatabaseResourceRegexes} message DatabaseResourceRegexes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseResourceRegexes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.DatabaseResourceRegex.toObject(message.patterns[j], options); + } + return object; + }; + + /** + * Converts this DatabaseResourceRegexes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @instance + * @returns {Object.} JSON object + */ + DatabaseResourceRegexes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Status enum. - * @name google.privacy.dlp.v2.DiscoveryConfig.Status - * @enum {number} - * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value - * @property {number} RUNNING=1 RUNNING value - * @property {number} PAUSED=2 PAUSED value + * Gets the default type url for DatabaseResourceRegexes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - DiscoveryConfig.Status = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; - values[valuesById[1] = "RUNNING"] = 1; - values[valuesById[2] = "PAUSED"] = 2; - return values; - })(); + DatabaseResourceRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceRegexes"; + }; - return DiscoveryConfig; + return DatabaseResourceRegexes; })(); - v2.DiscoveryTarget = (function() { + v2.DatabaseResourceRegex = (function() { /** - * Properties of a DiscoveryTarget. + * Properties of a DatabaseResourceRegex. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryTarget - * @property {google.privacy.dlp.v2.IBigQueryDiscoveryTarget|null} [bigQueryTarget] DiscoveryTarget bigQueryTarget - * @property {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget|null} [cloudSqlTarget] DiscoveryTarget cloudSqlTarget - * @property {google.privacy.dlp.v2.ISecretsDiscoveryTarget|null} [secretsTarget] DiscoveryTarget secretsTarget - * @property {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null} [cloudStorageTarget] DiscoveryTarget cloudStorageTarget + * @interface IDatabaseResourceRegex + * @property {string|null} [projectIdRegex] DatabaseResourceRegex projectIdRegex + * @property {string|null} [instanceRegex] DatabaseResourceRegex instanceRegex + * @property {string|null} [databaseRegex] DatabaseResourceRegex databaseRegex + * @property {string|null} [databaseResourceNameRegex] DatabaseResourceRegex databaseResourceNameRegex */ /** - * Constructs a new DiscoveryTarget. + * Constructs a new DatabaseResourceRegex. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryTarget. - * @implements IDiscoveryTarget + * @classdesc Represents a DatabaseResourceRegex. + * @implements IDatabaseResourceRegex * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryTarget=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDatabaseResourceRegex=} [properties] Properties to set */ - function DiscoveryTarget(properties) { + function DatabaseResourceRegex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54013,131 +58695,117 @@ } /** - * DiscoveryTarget bigQueryTarget. - * @member {google.privacy.dlp.v2.IBigQueryDiscoveryTarget|null|undefined} bigQueryTarget - * @memberof google.privacy.dlp.v2.DiscoveryTarget - * @instance - */ - DiscoveryTarget.prototype.bigQueryTarget = null; - - /** - * DiscoveryTarget cloudSqlTarget. - * @member {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget|null|undefined} cloudSqlTarget - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * DatabaseResourceRegex projectIdRegex. + * @member {string} projectIdRegex + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @instance */ - DiscoveryTarget.prototype.cloudSqlTarget = null; + DatabaseResourceRegex.prototype.projectIdRegex = ""; /** - * DiscoveryTarget secretsTarget. - * @member {google.privacy.dlp.v2.ISecretsDiscoveryTarget|null|undefined} secretsTarget - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * DatabaseResourceRegex instanceRegex. + * @member {string} instanceRegex + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @instance */ - DiscoveryTarget.prototype.secretsTarget = null; + DatabaseResourceRegex.prototype.instanceRegex = ""; /** - * DiscoveryTarget cloudStorageTarget. - * @member {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null|undefined} cloudStorageTarget - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * DatabaseResourceRegex databaseRegex. + * @member {string} databaseRegex + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @instance */ - DiscoveryTarget.prototype.cloudStorageTarget = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DatabaseResourceRegex.prototype.databaseRegex = ""; /** - * DiscoveryTarget target. - * @member {"bigQueryTarget"|"cloudSqlTarget"|"secretsTarget"|"cloudStorageTarget"|undefined} target - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * DatabaseResourceRegex databaseResourceNameRegex. + * @member {string} databaseResourceNameRegex + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @instance */ - Object.defineProperty(DiscoveryTarget.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["bigQueryTarget", "cloudSqlTarget", "secretsTarget", "cloudStorageTarget"]), - set: $util.oneOfSetter($oneOfFields) - }); + DatabaseResourceRegex.prototype.databaseResourceNameRegex = ""; /** - * Creates a new DiscoveryTarget instance using the specified properties. + * Creates a new DatabaseResourceRegex instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryTarget=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget instance + * @param {google.privacy.dlp.v2.IDatabaseResourceRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex instance */ - DiscoveryTarget.create = function create(properties) { - return new DiscoveryTarget(properties); + DatabaseResourceRegex.create = function create(properties) { + return new DatabaseResourceRegex(properties); }; /** - * Encodes the specified DiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTarget.verify|verify} messages. + * Encodes the specified DatabaseResourceRegex message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegex.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryTarget} message DiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IDatabaseResourceRegex} message DatabaseResourceRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryTarget.encode = function encode(message, writer) { + DatabaseResourceRegex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bigQueryTarget != null && Object.hasOwnProperty.call(message, "bigQueryTarget")) - $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.encode(message.bigQueryTarget, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.cloudSqlTarget != null && Object.hasOwnProperty.call(message, "cloudSqlTarget")) - $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.encode(message.cloudSqlTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.secretsTarget != null && Object.hasOwnProperty.call(message, "secretsTarget")) - $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.encode(message.secretsTarget, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.cloudStorageTarget != null && Object.hasOwnProperty.call(message, "cloudStorageTarget")) - $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.encode(message.cloudStorageTarget, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); + if (message.instanceRegex != null && Object.hasOwnProperty.call(message, "instanceRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceRegex); + if (message.databaseRegex != null && Object.hasOwnProperty.call(message, "databaseRegex")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseRegex); + if (message.databaseResourceNameRegex != null && Object.hasOwnProperty.call(message, "databaseResourceNameRegex")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseResourceNameRegex); return writer; }; /** - * Encodes the specified DiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTarget.verify|verify} messages. + * Encodes the specified DatabaseResourceRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegex.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryTarget} message DiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IDatabaseResourceRegex} message DatabaseResourceRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + DatabaseResourceRegex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryTarget message from the specified reader or buffer. + * Decodes a DatabaseResourceRegex message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget + * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryTarget.decode = function decode(reader, length) { + DatabaseResourceRegex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryTarget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceRegex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.decode(reader, reader.uint32()); + message.projectIdRegex = reader.string(); break; } case 2: { - message.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.decode(reader, reader.uint32()); + message.instanceRegex = reader.string(); break; } case 3: { - message.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.decode(reader, reader.uint32()); + message.databaseRegex = reader.string(); break; } case 4: { - message.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.decode(reader, reader.uint32()); + message.databaseResourceNameRegex = reader.string(); break; } default: @@ -54149,195 +58817,146 @@ }; /** - * Decodes a DiscoveryTarget message from the specified reader or buffer, length delimited. + * Decodes a DatabaseResourceRegex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget + * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + DatabaseResourceRegex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryTarget message. + * Verifies a DatabaseResourceRegex message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryTarget.verify = function verify(message) { + DatabaseResourceRegex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.bigQueryTarget != null && message.hasOwnProperty("bigQueryTarget")) { - properties.target = 1; - { - var error = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify(message.bigQueryTarget); - if (error) - return "bigQueryTarget." + error; - } - } - if (message.cloudSqlTarget != null && message.hasOwnProperty("cloudSqlTarget")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - { - var error = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify(message.cloudSqlTarget); - if (error) - return "cloudSqlTarget." + error; - } - } - if (message.secretsTarget != null && message.hasOwnProperty("secretsTarget")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - { - var error = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.verify(message.secretsTarget); - if (error) - return "secretsTarget." + error; - } - } - if (message.cloudStorageTarget != null && message.hasOwnProperty("cloudStorageTarget")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - { - var error = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify(message.cloudStorageTarget); - if (error) - return "cloudStorageTarget." + error; - } - } + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + if (!$util.isString(message.projectIdRegex)) + return "projectIdRegex: string expected"; + if (message.instanceRegex != null && message.hasOwnProperty("instanceRegex")) + if (!$util.isString(message.instanceRegex)) + return "instanceRegex: string expected"; + if (message.databaseRegex != null && message.hasOwnProperty("databaseRegex")) + if (!$util.isString(message.databaseRegex)) + return "databaseRegex: string expected"; + if (message.databaseResourceNameRegex != null && message.hasOwnProperty("databaseResourceNameRegex")) + if (!$util.isString(message.databaseResourceNameRegex)) + return "databaseResourceNameRegex: string expected"; return null; }; - - /** - * Creates a DiscoveryTarget message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryTarget - * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget - */ - DiscoveryTarget.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryTarget) - return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryTarget(); - if (object.bigQueryTarget != null) { - if (typeof object.bigQueryTarget !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.bigQueryTarget: object expected"); - message.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.fromObject(object.bigQueryTarget); - } - if (object.cloudSqlTarget != null) { - if (typeof object.cloudSqlTarget !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.cloudSqlTarget: object expected"); - message.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.fromObject(object.cloudSqlTarget); - } - if (object.secretsTarget != null) { - if (typeof object.secretsTarget !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.secretsTarget: object expected"); - message.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.fromObject(object.secretsTarget); - } - if (object.cloudStorageTarget != null) { - if (typeof object.cloudStorageTarget !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.cloudStorageTarget: object expected"); - message.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.fromObject(object.cloudStorageTarget); - } + + /** + * Creates a DatabaseResourceRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex + */ + DatabaseResourceRegex.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceRegex) + return object; + var message = new $root.google.privacy.dlp.v2.DatabaseResourceRegex(); + if (object.projectIdRegex != null) + message.projectIdRegex = String(object.projectIdRegex); + if (object.instanceRegex != null) + message.instanceRegex = String(object.instanceRegex); + if (object.databaseRegex != null) + message.databaseRegex = String(object.databaseRegex); + if (object.databaseResourceNameRegex != null) + message.databaseResourceNameRegex = String(object.databaseResourceNameRegex); return message; }; /** - * Creates a plain object from a DiscoveryTarget message. Also converts values to other types if specified. + * Creates a plain object from a DatabaseResourceRegex message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @static - * @param {google.privacy.dlp.v2.DiscoveryTarget} message DiscoveryTarget + * @param {google.privacy.dlp.v2.DatabaseResourceRegex} message DatabaseResourceRegex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryTarget.toObject = function toObject(message, options) { + DatabaseResourceRegex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.bigQueryTarget != null && message.hasOwnProperty("bigQueryTarget")) { - object.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.toObject(message.bigQueryTarget, options); - if (options.oneofs) - object.target = "bigQueryTarget"; - } - if (message.cloudSqlTarget != null && message.hasOwnProperty("cloudSqlTarget")) { - object.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.toObject(message.cloudSqlTarget, options); - if (options.oneofs) - object.target = "cloudSqlTarget"; - } - if (message.secretsTarget != null && message.hasOwnProperty("secretsTarget")) { - object.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.toObject(message.secretsTarget, options); - if (options.oneofs) - object.target = "secretsTarget"; - } - if (message.cloudStorageTarget != null && message.hasOwnProperty("cloudStorageTarget")) { - object.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.toObject(message.cloudStorageTarget, options); - if (options.oneofs) - object.target = "cloudStorageTarget"; + if (options.defaults) { + object.projectIdRegex = ""; + object.instanceRegex = ""; + object.databaseRegex = ""; + object.databaseResourceNameRegex = ""; } + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + object.projectIdRegex = message.projectIdRegex; + if (message.instanceRegex != null && message.hasOwnProperty("instanceRegex")) + object.instanceRegex = message.instanceRegex; + if (message.databaseRegex != null && message.hasOwnProperty("databaseRegex")) + object.databaseRegex = message.databaseRegex; + if (message.databaseResourceNameRegex != null && message.hasOwnProperty("databaseResourceNameRegex")) + object.databaseResourceNameRegex = message.databaseResourceNameRegex; return object; }; /** - * Converts this DiscoveryTarget to JSON. + * Converts this DatabaseResourceRegex to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @instance * @returns {Object.} JSON object */ - DiscoveryTarget.prototype.toJSON = function toJSON() { + DatabaseResourceRegex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryTarget + * Gets the default type url for DatabaseResourceRegex * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DatabaseResourceRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryTarget"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceRegex"; }; - return DiscoveryTarget; + return DatabaseResourceRegex; })(); - v2.BigQueryDiscoveryTarget = (function() { + v2.AllOtherDatabaseResources = (function() { /** - * Properties of a BigQueryDiscoveryTarget. + * Properties of an AllOtherDatabaseResources. * @memberof google.privacy.dlp.v2 - * @interface IBigQueryDiscoveryTarget - * @property {google.privacy.dlp.v2.IDiscoveryBigQueryFilter|null} [filter] BigQueryDiscoveryTarget filter - * @property {google.privacy.dlp.v2.IDiscoveryBigQueryConditions|null} [conditions] BigQueryDiscoveryTarget conditions - * @property {google.privacy.dlp.v2.IDiscoveryGenerationCadence|null} [cadence] BigQueryDiscoveryTarget cadence - * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] BigQueryDiscoveryTarget disabled + * @interface IAllOtherDatabaseResources */ /** - * Constructs a new BigQueryDiscoveryTarget. + * Constructs a new AllOtherDatabaseResources. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a BigQueryDiscoveryTarget. - * @implements IBigQueryDiscoveryTarget + * @classdesc Represents an AllOtherDatabaseResources. + * @implements IAllOtherDatabaseResources * @constructor - * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources=} [properties] Properties to set */ - function BigQueryDiscoveryTarget(properties) { + function AllOtherDatabaseResources(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54345,133 +58964,63 @@ } /** - * BigQueryDiscoveryTarget filter. - * @member {google.privacy.dlp.v2.IDiscoveryBigQueryFilter|null|undefined} filter - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget - * @instance - */ - BigQueryDiscoveryTarget.prototype.filter = null; - - /** - * BigQueryDiscoveryTarget conditions. - * @member {google.privacy.dlp.v2.IDiscoveryBigQueryConditions|null|undefined} conditions - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget - * @instance - */ - BigQueryDiscoveryTarget.prototype.conditions = null; - - /** - * BigQueryDiscoveryTarget cadence. - * @member {google.privacy.dlp.v2.IDiscoveryGenerationCadence|null|undefined} cadence - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget - * @instance - */ - BigQueryDiscoveryTarget.prototype.cadence = null; - - /** - * BigQueryDiscoveryTarget disabled. - * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget - * @instance - */ - BigQueryDiscoveryTarget.prototype.disabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BigQueryDiscoveryTarget frequency. - * @member {"cadence"|"disabled"|undefined} frequency - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget - * @instance - */ - Object.defineProperty(BigQueryDiscoveryTarget.prototype, "frequency", { - get: $util.oneOfGetter($oneOfFields = ["cadence", "disabled"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BigQueryDiscoveryTarget instance using the specified properties. + * Creates a new AllOtherDatabaseResources instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static - * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget instance + * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources instance */ - BigQueryDiscoveryTarget.create = function create(properties) { - return new BigQueryDiscoveryTarget(properties); + AllOtherDatabaseResources.create = function create(properties) { + return new AllOtherDatabaseResources(properties); }; /** - * Encodes the specified BigQueryDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify|verify} messages. + * Encodes the specified AllOtherDatabaseResources message. Does not implicitly {@link google.privacy.dlp.v2.AllOtherDatabaseResources.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static - * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget} message BigQueryDiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources} message AllOtherDatabaseResources message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDiscoveryTarget.encode = function encode(message, writer) { + AllOtherDatabaseResources.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) - $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.encode(message.conditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cadence != null && Object.hasOwnProperty.call(message, "cadence")) - $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.encode(message.cadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified BigQueryDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify|verify} messages. + * Encodes the specified AllOtherDatabaseResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AllOtherDatabaseResources.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static - * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget} message BigQueryDiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources} message AllOtherDatabaseResources message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + AllOtherDatabaseResources.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryDiscoveryTarget message from the specified reader or buffer. + * Decodes an AllOtherDatabaseResources message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDiscoveryTarget.decode = function decode(reader, length) { + AllOtherDatabaseResources.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AllOtherDatabaseResources(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.decode(reader, reader.uint32()); - break; - } - case 2: { - message.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.decode(reader, reader.uint32()); - break; - } - case 3: { - message.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.decode(reader, reader.uint32()); - break; - } - case 4: { - message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -54481,182 +59030,112 @@ }; /** - * Decodes a BigQueryDiscoveryTarget message from the specified reader or buffer, length delimited. + * Decodes an AllOtherDatabaseResources message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + AllOtherDatabaseResources.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryDiscoveryTarget message. + * Verifies an AllOtherDatabaseResources message. * @function verify - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryDiscoveryTarget.verify = function verify(message) { + AllOtherDatabaseResources.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.conditions != null && message.hasOwnProperty("conditions")) { - var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify(message.conditions); - if (error) - return "conditions." + error; - } - if (message.cadence != null && message.hasOwnProperty("cadence")) { - properties.frequency = 1; - { - var error = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.verify(message.cadence); - if (error) - return "cadence." + error; - } - } - if (message.disabled != null && message.hasOwnProperty("disabled")) { - if (properties.frequency === 1) - return "frequency: multiple values"; - properties.frequency = 1; - { - var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled); - if (error) - return "disabled." + error; - } - } return null; }; /** - * Creates a BigQueryDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * Creates an AllOtherDatabaseResources message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources */ - BigQueryDiscoveryTarget.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget) + AllOtherDatabaseResources.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.AllOtherDatabaseResources) return object; - var message = new $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget(); - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.filter: object expected"); - message.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.fromObject(object.filter); - } - if (object.conditions != null) { - if (typeof object.conditions !== "object") - throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.conditions: object expected"); - message.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.fromObject(object.conditions); - } - if (object.cadence != null) { - if (typeof object.cadence !== "object") - throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.cadence: object expected"); - message.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.fromObject(object.cadence); - } - if (object.disabled != null) { - if (typeof object.disabled !== "object") - throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.disabled: object expected"); - message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled); - } - return message; + return new $root.google.privacy.dlp.v2.AllOtherDatabaseResources(); }; /** - * Creates a plain object from a BigQueryDiscoveryTarget message. Also converts values to other types if specified. + * Creates a plain object from an AllOtherDatabaseResources message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static - * @param {google.privacy.dlp.v2.BigQueryDiscoveryTarget} message BigQueryDiscoveryTarget + * @param {google.privacy.dlp.v2.AllOtherDatabaseResources} message AllOtherDatabaseResources * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryDiscoveryTarget.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.filter = null; - object.conditions = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.toObject(message.filter, options); - if (message.conditions != null && message.hasOwnProperty("conditions")) - object.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.toObject(message.conditions, options); - if (message.cadence != null && message.hasOwnProperty("cadence")) { - object.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.toObject(message.cadence, options); - if (options.oneofs) - object.frequency = "cadence"; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) { - object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); - if (options.oneofs) - object.frequency = "disabled"; - } - return object; + AllOtherDatabaseResources.toObject = function toObject() { + return {}; }; /** - * Converts this BigQueryDiscoveryTarget to JSON. + * Converts this AllOtherDatabaseResources to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @instance * @returns {Object.} JSON object */ - BigQueryDiscoveryTarget.prototype.toJSON = function toJSON() { + AllOtherDatabaseResources.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryDiscoveryTarget + * Gets the default type url for AllOtherDatabaseResources * @function getTypeUrl - * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AllOtherDatabaseResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryDiscoveryTarget"; + return typeUrlPrefix + "/google.privacy.dlp.v2.AllOtherDatabaseResources"; }; - return BigQueryDiscoveryTarget; + return AllOtherDatabaseResources; })(); - v2.DiscoveryBigQueryFilter = (function() { + v2.DatabaseResourceReference = (function() { /** - * Properties of a DiscoveryBigQueryFilter. + * Properties of a DatabaseResourceReference. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryBigQueryFilter - * @property {google.privacy.dlp.v2.IBigQueryTableCollection|null} [tables] DiscoveryBigQueryFilter tables - * @property {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables|null} [otherTables] DiscoveryBigQueryFilter otherTables - * @property {google.privacy.dlp.v2.ITableReference|null} [tableReference] DiscoveryBigQueryFilter tableReference + * @interface IDatabaseResourceReference + * @property {string|null} [projectId] DatabaseResourceReference projectId + * @property {string|null} [instance] DatabaseResourceReference instance + * @property {string|null} [database] DatabaseResourceReference database + * @property {string|null} [databaseResource] DatabaseResourceReference databaseResource */ /** - * Constructs a new DiscoveryBigQueryFilter. + * Constructs a new DatabaseResourceReference. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryBigQueryFilter. - * @implements IDiscoveryBigQueryFilter + * @classdesc Represents a DatabaseResourceReference. + * @implements IDatabaseResourceReference * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDatabaseResourceReference=} [properties] Properties to set */ - function DiscoveryBigQueryFilter(properties) { + function DatabaseResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -54664,117 +59143,117 @@ } /** - * DiscoveryBigQueryFilter tables. - * @member {google.privacy.dlp.v2.IBigQueryTableCollection|null|undefined} tables - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * DatabaseResourceReference projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @instance */ - DiscoveryBigQueryFilter.prototype.tables = null; + DatabaseResourceReference.prototype.projectId = ""; /** - * DiscoveryBigQueryFilter otherTables. - * @member {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables|null|undefined} otherTables - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * DatabaseResourceReference instance. + * @member {string} instance + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @instance */ - DiscoveryBigQueryFilter.prototype.otherTables = null; + DatabaseResourceReference.prototype.instance = ""; /** - * DiscoveryBigQueryFilter tableReference. - * @member {google.privacy.dlp.v2.ITableReference|null|undefined} tableReference - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * DatabaseResourceReference database. + * @member {string} database + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @instance */ - DiscoveryBigQueryFilter.prototype.tableReference = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DatabaseResourceReference.prototype.database = ""; /** - * DiscoveryBigQueryFilter filter. - * @member {"tables"|"otherTables"|"tableReference"|undefined} filter - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * DatabaseResourceReference databaseResource. + * @member {string} databaseResource + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @instance */ - Object.defineProperty(DiscoveryBigQueryFilter.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["tables", "otherTables", "tableReference"]), - set: $util.oneOfSetter($oneOfFields) - }); + DatabaseResourceReference.prototype.databaseResource = ""; /** - * Creates a new DiscoveryBigQueryFilter instance using the specified properties. + * Creates a new DatabaseResourceReference instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @static - * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter instance + * @param {google.privacy.dlp.v2.IDatabaseResourceReference=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference instance */ - DiscoveryBigQueryFilter.create = function create(properties) { - return new DiscoveryBigQueryFilter(properties); + DatabaseResourceReference.create = function create(properties) { + return new DatabaseResourceReference(properties); }; /** - * Encodes the specified DiscoveryBigQueryFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify|verify} messages. + * Encodes the specified DatabaseResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceReference.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @static - * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter} message DiscoveryBigQueryFilter message or plain object to encode + * @param {google.privacy.dlp.v2.IDatabaseResourceReference} message DatabaseResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryBigQueryFilter.encode = function encode(message, writer) { + DatabaseResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) - $root.google.privacy.dlp.v2.BigQueryTableCollection.encode(message.tables, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.otherTables != null && Object.hasOwnProperty.call(message, "otherTables")) - $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.encode(message.otherTables, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.tableReference != null && Object.hasOwnProperty.call(message, "tableReference")) - $root.google.privacy.dlp.v2.TableReference.encode(message.tableReference, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instance); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.database); + if (message.databaseResource != null && Object.hasOwnProperty.call(message, "databaseResource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseResource); return writer; }; /** - * Encodes the specified DiscoveryBigQueryFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify|verify} messages. + * Encodes the specified DatabaseResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @static - * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter} message DiscoveryBigQueryFilter message or plain object to encode + * @param {google.privacy.dlp.v2.IDatabaseResourceReference} message DatabaseResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryBigQueryFilter.encodeDelimited = function encodeDelimited(message, writer) { + DatabaseResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryBigQueryFilter message from the specified reader or buffer. + * Decodes a DatabaseResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryBigQueryFilter.decode = function decode(reader, length) { + DatabaseResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.decode(reader, reader.uint32()); + message.projectId = reader.string(); break; } case 2: { - message.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.decode(reader, reader.uint32()); + message.instance = reader.string(); break; } case 3: { - message.tableReference = $root.google.privacy.dlp.v2.TableReference.decode(reader, reader.uint32()); + message.database = reader.string(); + break; + } + case 4: { + message.databaseResource = reader.string(); break; } default: @@ -54786,347 +59265,150 @@ }; /** - * Decodes a DiscoveryBigQueryFilter message from the specified reader or buffer, length delimited. + * Decodes a DatabaseResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryBigQueryFilter.decodeDelimited = function decodeDelimited(reader) { + DatabaseResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryBigQueryFilter message. + * Verifies a DatabaseResourceReference message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryBigQueryFilter.verify = function verify(message) { + DatabaseResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.tables != null && message.hasOwnProperty("tables")) { - properties.filter = 1; - { - var error = $root.google.privacy.dlp.v2.BigQueryTableCollection.verify(message.tables); - if (error) - return "tables." + error; - } - } - if (message.otherTables != null && message.hasOwnProperty("otherTables")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify(message.otherTables); - if (error) - return "otherTables." + error; - } - } - if (message.tableReference != null && message.hasOwnProperty("tableReference")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.privacy.dlp.v2.TableReference.verify(message.tableReference); - if (error) - return "tableReference." + error; - } - } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.databaseResource != null && message.hasOwnProperty("databaseResource")) + if (!$util.isString(message.databaseResource)) + return "databaseResource: string expected"; return null; }; /** - * Creates a DiscoveryBigQueryFilter message from a plain object. Also converts values to their respective internal types. + * Creates a DatabaseResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference */ - DiscoveryBigQueryFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter) + DatabaseResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceReference) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter(); - if (object.tables != null) { - if (typeof object.tables !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.tables: object expected"); - message.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.fromObject(object.tables); - } - if (object.otherTables != null) { - if (typeof object.otherTables !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.otherTables: object expected"); - message.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.fromObject(object.otherTables); - } - if (object.tableReference != null) { - if (typeof object.tableReference !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.tableReference: object expected"); - message.tableReference = $root.google.privacy.dlp.v2.TableReference.fromObject(object.tableReference); - } + var message = new $root.google.privacy.dlp.v2.DatabaseResourceReference(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instance != null) + message.instance = String(object.instance); + if (object.database != null) + message.database = String(object.database); + if (object.databaseResource != null) + message.databaseResource = String(object.databaseResource); return message; }; /** - * Creates a plain object from a DiscoveryBigQueryFilter message. Also converts values to other types if specified. + * Creates a plain object from a DatabaseResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @memberof google.privacy.dlp.v2.DatabaseResourceReference * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter} message DiscoveryBigQueryFilter + * @param {google.privacy.dlp.v2.DatabaseResourceReference} message DatabaseResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryBigQueryFilter.toObject = function toObject(message, options) { + DatabaseResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.tables != null && message.hasOwnProperty("tables")) { - object.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.toObject(message.tables, options); - if (options.oneofs) - object.filter = "tables"; - } - if (message.otherTables != null && message.hasOwnProperty("otherTables")) { - object.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.toObject(message.otherTables, options); - if (options.oneofs) - object.filter = "otherTables"; - } - if (message.tableReference != null && message.hasOwnProperty("tableReference")) { - object.tableReference = $root.google.privacy.dlp.v2.TableReference.toObject(message.tableReference, options); - if (options.oneofs) - object.filter = "tableReference"; - } - return object; - }; - - /** - * Converts this DiscoveryBigQueryFilter to JSON. - * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter - * @instance - * @returns {Object.} JSON object - */ - DiscoveryBigQueryFilter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DiscoveryBigQueryFilter - * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DiscoveryBigQueryFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryFilter"; - }; - - DiscoveryBigQueryFilter.AllOtherBigQueryTables = (function() { - - /** - * Properties of an AllOtherBigQueryTables. - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter - * @interface IAllOtherBigQueryTables - */ - - /** - * Constructs a new AllOtherBigQueryTables. - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter - * @classdesc Represents an AllOtherBigQueryTables. - * @implements IAllOtherBigQueryTables - * @constructor - * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables=} [properties] Properties to set - */ - function AllOtherBigQueryTables(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + if (options.defaults) { + object.projectId = ""; + object.instance = ""; + object.database = ""; + object.databaseResource = ""; } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.databaseResource != null && message.hasOwnProperty("databaseResource")) + object.databaseResource = message.databaseResource; + return object; + }; - /** - * Creates a new AllOtherBigQueryTables instance using the specified properties. - * @function create - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables instance - */ - AllOtherBigQueryTables.create = function create(properties) { - return new AllOtherBigQueryTables(properties); - }; - - /** - * Encodes the specified AllOtherBigQueryTables message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify|verify} messages. - * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables} message AllOtherBigQueryTables message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllOtherBigQueryTables.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified AllOtherBigQueryTables message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify|verify} messages. - * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables} message AllOtherBigQueryTables message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllOtherBigQueryTables.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AllOtherBigQueryTables message from the specified reader or buffer. - * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllOtherBigQueryTables.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AllOtherBigQueryTables message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllOtherBigQueryTables.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AllOtherBigQueryTables message. - * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AllOtherBigQueryTables.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an AllOtherBigQueryTables message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables - */ - AllOtherBigQueryTables.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables) - return object; - return new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables(); - }; - - /** - * Creates a plain object from an AllOtherBigQueryTables message. Also converts values to other types if specified. - * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} message AllOtherBigQueryTables - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AllOtherBigQueryTables.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AllOtherBigQueryTables to JSON. - * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @instance - * @returns {Object.} JSON object - */ - AllOtherBigQueryTables.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AllOtherBigQueryTables - * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AllOtherBigQueryTables.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables"; - }; - - return AllOtherBigQueryTables; - })(); + /** + * Converts this DatabaseResourceReference to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @instance + * @returns {Object.} JSON object + */ + DatabaseResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return DiscoveryBigQueryFilter; + /** + * Gets the default type url for DatabaseResourceReference + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceReference"; + }; + + return DatabaseResourceReference; })(); - v2.BigQueryTableCollection = (function() { + v2.DiscoveryCloudSqlConditions = (function() { /** - * Properties of a BigQueryTableCollection. + * Properties of a DiscoveryCloudSqlConditions. * @memberof google.privacy.dlp.v2 - * @interface IBigQueryTableCollection - * @property {google.privacy.dlp.v2.IBigQueryRegexes|null} [includeRegexes] BigQueryTableCollection includeRegexes + * @interface IDiscoveryCloudSqlConditions + * @property {Array.|null} [databaseEngines] DiscoveryCloudSqlConditions databaseEngines + * @property {Array.|null} [types] DiscoveryCloudSqlConditions types */ /** - * Constructs a new BigQueryTableCollection. + * Constructs a new DiscoveryCloudSqlConditions. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a BigQueryTableCollection. - * @implements IBigQueryTableCollection + * @classdesc Represents a DiscoveryCloudSqlConditions. + * @implements IDiscoveryCloudSqlConditions * @constructor - * @param {google.privacy.dlp.v2.IBigQueryTableCollection=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions=} [properties] Properties to set */ - function BigQueryTableCollection(properties) { + function DiscoveryCloudSqlConditions(properties) { + this.databaseEngines = []; + this.types = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55134,89 +59416,111 @@ } /** - * BigQueryTableCollection includeRegexes. - * @member {google.privacy.dlp.v2.IBigQueryRegexes|null|undefined} includeRegexes - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * DiscoveryCloudSqlConditions databaseEngines. + * @member {Array.} databaseEngines + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @instance */ - BigQueryTableCollection.prototype.includeRegexes = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DiscoveryCloudSqlConditions.prototype.databaseEngines = $util.emptyArray; /** - * BigQueryTableCollection pattern. - * @member {"includeRegexes"|undefined} pattern - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * DiscoveryCloudSqlConditions types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @instance */ - Object.defineProperty(BigQueryTableCollection.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), - set: $util.oneOfSetter($oneOfFields) - }); + DiscoveryCloudSqlConditions.prototype.types = $util.emptyArray; /** - * Creates a new BigQueryTableCollection instance using the specified properties. + * Creates a new DiscoveryCloudSqlConditions instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static - * @param {google.privacy.dlp.v2.IBigQueryTableCollection=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection instance + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions instance */ - BigQueryTableCollection.create = function create(properties) { - return new BigQueryTableCollection(properties); + DiscoveryCloudSqlConditions.create = function create(properties) { + return new DiscoveryCloudSqlConditions(properties); }; /** - * Encodes the specified BigQueryTableCollection message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableCollection.verify|verify} messages. + * Encodes the specified DiscoveryCloudSqlConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static - * @param {google.privacy.dlp.v2.IBigQueryTableCollection} message BigQueryTableCollection message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryTableCollection.encode = function encode(message, writer) { + DiscoveryCloudSqlConditions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) - $root.google.privacy.dlp.v2.BigQueryRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.databaseEngines != null && message.databaseEngines.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.databaseEngines.length; ++i) + writer.int32(message.databaseEngines[i]); + writer.ldelim(); + } + if (message.types != null && message.types.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified BigQueryTableCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableCollection.verify|verify} messages. + * Encodes the specified DiscoveryCloudSqlConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static - * @param {google.privacy.dlp.v2.IBigQueryTableCollection} message BigQueryTableCollection message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryTableCollection.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryCloudSqlConditions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryTableCollection message from the specified reader or buffer. + * Decodes a DiscoveryCloudSqlConditions message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryTableCollection.decode = function decode(reader, length) { + DiscoveryCloudSqlConditions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryTableCollection(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.decode(reader, reader.uint32()); + if (!(message.databaseEngines && message.databaseEngines.length)) + message.databaseEngines = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.databaseEngines.push(reader.int32()); + } else + message.databaseEngines.push(reader.int32()); + break; + } + case 3: { + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); break; } default: @@ -55228,135 +59532,244 @@ }; /** - * Decodes a BigQueryTableCollection message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryCloudSqlConditions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryTableCollection.decodeDelimited = function decodeDelimited(reader) { + DiscoveryCloudSqlConditions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryTableCollection message. + * Verifies a DiscoveryCloudSqlConditions message. * @function verify - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryTableCollection.verify = function verify(message) { + DiscoveryCloudSqlConditions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { - properties.pattern = 1; - { - var error = $root.google.privacy.dlp.v2.BigQueryRegexes.verify(message.includeRegexes); - if (error) - return "includeRegexes." + error; - } + if (message.databaseEngines != null && message.hasOwnProperty("databaseEngines")) { + if (!Array.isArray(message.databaseEngines)) + return "databaseEngines: array expected"; + for (var i = 0; i < message.databaseEngines.length; ++i) + switch (message.databaseEngines[i]) { + default: + return "databaseEngines: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } } return null; }; /** - * Creates a BigQueryTableCollection message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryCloudSqlConditions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions */ - BigQueryTableCollection.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.BigQueryTableCollection) + DiscoveryCloudSqlConditions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions) return object; - var message = new $root.google.privacy.dlp.v2.BigQueryTableCollection(); - if (object.includeRegexes != null) { - if (typeof object.includeRegexes !== "object") - throw TypeError(".google.privacy.dlp.v2.BigQueryTableCollection.includeRegexes: object expected"); - message.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.fromObject(object.includeRegexes); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions(); + if (object.databaseEngines) { + if (!Array.isArray(object.databaseEngines)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlConditions.databaseEngines: array expected"); + message.databaseEngines = []; + for (var i = 0; i < object.databaseEngines.length; ++i) + switch (object.databaseEngines[i]) { + default: + if (typeof object.databaseEngines[i] === "number") { + message.databaseEngines[i] = object.databaseEngines[i]; + break; + } + case "DATABASE_ENGINE_UNSPECIFIED": + case 0: + message.databaseEngines[i] = 0; + break; + case "ALL_SUPPORTED_DATABASE_ENGINES": + case 1: + message.databaseEngines[i] = 1; + break; + case "MYSQL": + case 2: + message.databaseEngines[i] = 2; + break; + case "POSTGRES": + case 3: + message.databaseEngines[i] = 3; + break; + } + } + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlConditions.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "DATABASE_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES": + case 1: + message.types[i] = 1; + break; + case "DATABASE_RESOURCE_TYPE_TABLE": + case 2: + message.types[i] = 2; + break; + } } return message; }; /** - * Creates a plain object from a BigQueryTableCollection message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryCloudSqlConditions message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static - * @param {google.privacy.dlp.v2.BigQueryTableCollection} message BigQueryTableCollection + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryTableCollection.toObject = function toObject(message, options) { + DiscoveryCloudSqlConditions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { - object.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.toObject(message.includeRegexes, options); - if (options.oneofs) - object.pattern = "includeRegexes"; + if (options.arrays || options.defaults) { + object.databaseEngines = []; + object.types = []; + } + if (message.databaseEngines && message.databaseEngines.length) { + object.databaseEngines = []; + for (var j = 0; j < message.databaseEngines.length; ++j) + object.databaseEngines[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine[message.databaseEngines[j]] === undefined ? message.databaseEngines[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine[message.databaseEngines[j]] : message.databaseEngines[j]; + } + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType[message.types[j]] : message.types[j]; } return object; }; /** - * Converts this BigQueryTableCollection to JSON. + * Converts this DiscoveryCloudSqlConditions to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @instance * @returns {Object.} JSON object */ - BigQueryTableCollection.prototype.toJSON = function toJSON() { + DiscoveryCloudSqlConditions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryTableCollection + * Gets the default type url for DiscoveryCloudSqlConditions * @function getTypeUrl - * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryTableCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryCloudSqlConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryTableCollection"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlConditions"; }; - return BigQueryTableCollection; + /** + * DatabaseEngine enum. + * @name google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine + * @enum {number} + * @property {number} DATABASE_ENGINE_UNSPECIFIED=0 DATABASE_ENGINE_UNSPECIFIED value + * @property {number} ALL_SUPPORTED_DATABASE_ENGINES=1 ALL_SUPPORTED_DATABASE_ENGINES value + * @property {number} MYSQL=2 MYSQL value + * @property {number} POSTGRES=3 POSTGRES value + */ + DiscoveryCloudSqlConditions.DatabaseEngine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SUPPORTED_DATABASE_ENGINES"] = 1; + values[valuesById[2] = "MYSQL"] = 2; + values[valuesById[3] = "POSTGRES"] = 3; + return values; + })(); + + /** + * DatabaseResourceType enum. + * @name google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType + * @enum {number} + * @property {number} DATABASE_RESOURCE_TYPE_UNSPECIFIED=0 DATABASE_RESOURCE_TYPE_UNSPECIFIED value + * @property {number} DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES=1 DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES value + * @property {number} DATABASE_RESOURCE_TYPE_TABLE=2 DATABASE_RESOURCE_TYPE_TABLE value + */ + DiscoveryCloudSqlConditions.DatabaseResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES"] = 1; + values[valuesById[2] = "DATABASE_RESOURCE_TYPE_TABLE"] = 2; + return values; + })(); + + return DiscoveryCloudSqlConditions; })(); - v2.DiscoveryBigQueryConditions = (function() { + v2.DiscoveryCloudSqlGenerationCadence = (function() { /** - * Properties of a DiscoveryBigQueryConditions. + * Properties of a DiscoveryCloudSqlGenerationCadence. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryBigQueryConditions - * @property {google.protobuf.ITimestamp|null} [createdAfter] DiscoveryBigQueryConditions createdAfter - * @property {google.privacy.dlp.v2.IBigQueryTableTypes|null} [types] DiscoveryBigQueryConditions types - * @property {google.privacy.dlp.v2.BigQueryTableTypeCollection|null} [typeCollection] DiscoveryBigQueryConditions typeCollection - * @property {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions|null} [orConditions] DiscoveryBigQueryConditions orConditions + * @interface IDiscoveryCloudSqlGenerationCadence + * @property {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null} [schemaModifiedCadence] DiscoveryCloudSqlGenerationCadence schemaModifiedCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryCloudSqlGenerationCadence refreshFrequency + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence */ /** - * Constructs a new DiscoveryBigQueryConditions. + * Constructs a new DiscoveryCloudSqlGenerationCadence. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryBigQueryConditions. - * @implements IDiscoveryBigQueryConditions + * @classdesc Represents a DiscoveryCloudSqlGenerationCadence. + * @implements IDiscoveryCloudSqlGenerationCadence * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence=} [properties] Properties to set */ - function DiscoveryBigQueryConditions(properties) { + function DiscoveryCloudSqlGenerationCadence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55364,131 +59777,103 @@ } /** - * DiscoveryBigQueryConditions createdAfter. - * @member {google.protobuf.ITimestamp|null|undefined} createdAfter - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions - * @instance - */ - DiscoveryBigQueryConditions.prototype.createdAfter = null; - - /** - * DiscoveryBigQueryConditions types. - * @member {google.privacy.dlp.v2.IBigQueryTableTypes|null|undefined} types - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions - * @instance - */ - DiscoveryBigQueryConditions.prototype.types = null; - - /** - * DiscoveryBigQueryConditions typeCollection. - * @member {google.privacy.dlp.v2.BigQueryTableTypeCollection|null|undefined} typeCollection - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * DiscoveryCloudSqlGenerationCadence schemaModifiedCadence. + * @member {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null|undefined} schemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @instance */ - DiscoveryBigQueryConditions.prototype.typeCollection = null; + DiscoveryCloudSqlGenerationCadence.prototype.schemaModifiedCadence = null; /** - * DiscoveryBigQueryConditions orConditions. - * @member {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions|null|undefined} orConditions - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * DiscoveryCloudSqlGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @instance */ - DiscoveryBigQueryConditions.prototype.orConditions = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + DiscoveryCloudSqlGenerationCadence.prototype.refreshFrequency = 0; /** - * DiscoveryBigQueryConditions includedTypes. - * @member {"types"|"typeCollection"|undefined} includedTypes - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @instance */ - Object.defineProperty(DiscoveryBigQueryConditions.prototype, "includedTypes", { - get: $util.oneOfGetter($oneOfFields = ["types", "typeCollection"]), - set: $util.oneOfSetter($oneOfFields) - }); + DiscoveryCloudSqlGenerationCadence.prototype.inspectTemplateModifiedCadence = null; /** - * Creates a new DiscoveryBigQueryConditions instance using the specified properties. + * Creates a new DiscoveryCloudSqlGenerationCadence instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions instance + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence instance */ - DiscoveryBigQueryConditions.create = function create(properties) { - return new DiscoveryBigQueryConditions(properties); + DiscoveryCloudSqlGenerationCadence.create = function create(properties) { + return new DiscoveryCloudSqlGenerationCadence(properties); }; /** - * Encodes the specified DiscoveryBigQueryConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify|verify} messages. + * Encodes the specified DiscoveryCloudSqlGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions} message DiscoveryBigQueryConditions message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryBigQueryConditions.encode = function encode(message, writer) { + DiscoveryCloudSqlGenerationCadence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createdAfter != null && Object.hasOwnProperty.call(message, "createdAfter")) - $root.google.protobuf.Timestamp.encode(message.createdAfter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.types != null && Object.hasOwnProperty.call(message, "types")) - $root.google.privacy.dlp.v2.BigQueryTableTypes.encode(message.types, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.typeCollection != null && Object.hasOwnProperty.call(message, "typeCollection")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.typeCollection); - if (message.orConditions != null && Object.hasOwnProperty.call(message, "orConditions")) - $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.encode(message.orConditions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.schemaModifiedCadence != null && Object.hasOwnProperty.call(message, "schemaModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.encode(message.schemaModifiedCadence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.refreshFrequency); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryBigQueryConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify|verify} messages. + * Encodes the specified DiscoveryCloudSqlGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions} message DiscoveryBigQueryConditions message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryBigQueryConditions.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryCloudSqlGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryBigQueryConditions message from the specified reader or buffer. + * Decodes a DiscoveryCloudSqlGenerationCadence message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryBigQueryConditions.decode = function decode(reader, length) { + DiscoveryCloudSqlGenerationCadence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createdAfter = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.decode(reader, reader.uint32()); break; } case 2: { - message.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.decode(reader, reader.uint32()); + message.refreshFrequency = reader.int32(); break; } case 3: { - message.typeCollection = reader.int32(); - break; - } - case 4: { - message.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.decode(reader, reader.uint32()); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32()); break; } default: @@ -55500,196 +59885,177 @@ }; /** - * Decodes a DiscoveryBigQueryConditions message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryCloudSqlGenerationCadence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryBigQueryConditions.decodeDelimited = function decodeDelimited(reader) { + DiscoveryCloudSqlGenerationCadence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryBigQueryConditions message. + * Verifies a DiscoveryCloudSqlGenerationCadence message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryBigQueryConditions.verify = function verify(message) { + DiscoveryCloudSqlGenerationCadence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) { - var error = $root.google.protobuf.Timestamp.verify(message.createdAfter); - if (error) - return "createdAfter." + error; - } - if (message.types != null && message.hasOwnProperty("types")) { - properties.includedTypes = 1; - { - var error = $root.google.privacy.dlp.v2.BigQueryTableTypes.verify(message.types); - if (error) - return "types." + error; - } - } - if (message.typeCollection != null && message.hasOwnProperty("typeCollection")) { - if (properties.includedTypes === 1) - return "includedTypes: multiple values"; - properties.includedTypes = 1; - switch (message.typeCollection) { + if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify(message.schemaModifiedCadence); + if (error) + return "schemaModifiedCadence." + error; + } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { default: - return "typeCollection: enum value expected"; + return "refreshFrequency: enum value expected"; case 0: case 1: case 2: + case 4: break; } - } - if (message.orConditions != null && message.hasOwnProperty("orConditions")) { - var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify(message.orConditions); + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence); if (error) - return "orConditions." + error; + return "inspectTemplateModifiedCadence." + error; } return null; }; /** - * Creates a DiscoveryBigQueryConditions message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryCloudSqlGenerationCadence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence */ - DiscoveryBigQueryConditions.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions) + DiscoveryCloudSqlGenerationCadence.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions(); - if (object.createdAfter != null) { - if (typeof object.createdAfter !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.createdAfter: object expected"); - message.createdAfter = $root.google.protobuf.Timestamp.fromObject(object.createdAfter); - } - if (object.types != null) { - if (typeof object.types !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.types: object expected"); - message.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.fromObject(object.types); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence(); + if (object.schemaModifiedCadence != null) { + if (typeof object.schemaModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.schemaModifiedCadence: object expected"); + message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.fromObject(object.schemaModifiedCadence); } - switch (object.typeCollection) { + switch (object.refreshFrequency) { default: - if (typeof object.typeCollection === "number") { - message.typeCollection = object.typeCollection; + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; break; } break; - case "BIG_QUERY_COLLECTION_UNSPECIFIED": + case "UPDATE_FREQUENCY_UNSPECIFIED": case 0: - message.typeCollection = 0; + message.refreshFrequency = 0; break; - case "BIG_QUERY_COLLECTION_ALL_TYPES": + case "UPDATE_FREQUENCY_NEVER": case 1: - message.typeCollection = 1; + message.refreshFrequency = 1; break; - case "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES": + case "UPDATE_FREQUENCY_DAILY": case 2: - message.typeCollection = 2; + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; break; } - if (object.orConditions != null) { - if (typeof object.orConditions !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.orConditions: object expected"); - message.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.fromObject(object.orConditions); + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence); } return message; }; /** - * Creates a plain object from a DiscoveryBigQueryConditions message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryCloudSqlGenerationCadence message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions} message DiscoveryBigQueryConditions + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryBigQueryConditions.toObject = function toObject(message, options) { + DiscoveryCloudSqlGenerationCadence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.createdAfter = null; - object.orConditions = null; - } - if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) - object.createdAfter = $root.google.protobuf.Timestamp.toObject(message.createdAfter, options); - if (message.types != null && message.hasOwnProperty("types")) { - object.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.toObject(message.types, options); - if (options.oneofs) - object.includedTypes = "types"; - } - if (message.typeCollection != null && message.hasOwnProperty("typeCollection")) { - object.typeCollection = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableTypeCollection[message.typeCollection] === undefined ? message.typeCollection : $root.google.privacy.dlp.v2.BigQueryTableTypeCollection[message.typeCollection] : message.typeCollection; - if (options.oneofs) - object.includedTypes = "typeCollection"; + object.schemaModifiedCadence = null; + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + object.inspectTemplateModifiedCadence = null; } - if (message.orConditions != null && message.hasOwnProperty("orConditions")) - object.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.toObject(message.orConditions, options); + if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) + object.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.toObject(message.schemaModifiedCadence, options); + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); return object; }; /** - * Converts this DiscoveryBigQueryConditions to JSON. + * Converts this DiscoveryCloudSqlGenerationCadence to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @instance * @returns {Object.} JSON object */ - DiscoveryBigQueryConditions.prototype.toJSON = function toJSON() { + DiscoveryCloudSqlGenerationCadence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryBigQueryConditions + * Gets the default type url for DiscoveryCloudSqlGenerationCadence * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryBigQueryConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryCloudSqlGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryConditions"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence"; }; - DiscoveryBigQueryConditions.OrConditions = (function() { + DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence = (function() { /** - * Properties of an OrConditions. - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions - * @interface IOrConditions - * @property {number|null} [minRowCount] OrConditions minRowCount - * @property {google.protobuf.IDuration|null} [minAge] OrConditions minAge + * Properties of a SchemaModifiedCadence. + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @interface ISchemaModifiedCadence + * @property {Array.|null} [types] SchemaModifiedCadence types + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] SchemaModifiedCadence frequency */ /** - * Constructs a new OrConditions. - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions - * @classdesc Represents an OrConditions. - * @implements IOrConditions + * Constructs a new SchemaModifiedCadence. + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @classdesc Represents a SchemaModifiedCadence. + * @implements ISchemaModifiedCadence * @constructor - * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions=} [properties] Properties to set + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence=} [properties] Properties to set */ - function OrConditions(properties) { + function SchemaModifiedCadence(properties) { + this.types = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55697,89 +60063,100 @@ } /** - * OrConditions minRowCount. - * @member {number} minRowCount - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * SchemaModifiedCadence types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @instance */ - OrConditions.prototype.minRowCount = 0; + SchemaModifiedCadence.prototype.types = $util.emptyArray; /** - * OrConditions minAge. - * @member {google.protobuf.IDuration|null|undefined} minAge - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * SchemaModifiedCadence frequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @instance */ - OrConditions.prototype.minAge = null; + SchemaModifiedCadence.prototype.frequency = 0; /** - * Creates a new OrConditions instance using the specified properties. + * Creates a new SchemaModifiedCadence instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions instance + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence instance */ - OrConditions.create = function create(properties) { - return new OrConditions(properties); + SchemaModifiedCadence.create = function create(properties) { + return new SchemaModifiedCadence(properties); }; /** - * Encodes the specified OrConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify|verify} messages. + * Encodes the specified SchemaModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions} message OrConditions message or plain object to encode + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence} message SchemaModifiedCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrConditions.encode = function encode(message, writer) { + SchemaModifiedCadence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.minRowCount != null && Object.hasOwnProperty.call(message, "minRowCount")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minRowCount); - if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) - $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.types != null && message.types.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); return writer; }; /** - * Encodes the specified OrConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify|verify} messages. + * Encodes the specified SchemaModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions} message OrConditions message or plain object to encode + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence} message SchemaModifiedCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OrConditions.encodeDelimited = function encodeDelimited(message, writer) { + SchemaModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OrConditions message from the specified reader or buffer. + * Decodes a SchemaModifiedCadence message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrConditions.decode = function decode(reader, length) { + SchemaModifiedCadence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.minRowCount = reader.int32(); + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); break; } case 2: { - message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + message.frequency = reader.int32(); break; } default: @@ -55791,142 +60168,214 @@ }; /** - * Decodes an OrConditions message from the specified reader or buffer, length delimited. + * Decodes a SchemaModifiedCadence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OrConditions.decodeDelimited = function decodeDelimited(reader) { + SchemaModifiedCadence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OrConditions message. + * Verifies a SchemaModifiedCadence message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OrConditions.verify = function verify(message) { + SchemaModifiedCadence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.minRowCount != null && message.hasOwnProperty("minRowCount")) - if (!$util.isInteger(message.minRowCount)) - return "minRowCount: integer expected"; - if (message.minAge != null && message.hasOwnProperty("minAge")) { - var error = $root.google.protobuf.Duration.verify(message.minAge); - if (error) - return "minAge." + error; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } return null; }; /** - * Creates an OrConditions message from a plain object. Also converts values to their respective internal types. + * Creates a SchemaModifiedCadence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence */ - OrConditions.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions) + SchemaModifiedCadence.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions(); - if (object.minRowCount != null) - message.minRowCount = object.minRowCount | 0; - if (object.minAge != null) { - if (typeof object.minAge !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.minAge: object expected"); - message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence(); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "SQL_SCHEMA_MODIFICATION_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "NEW_COLUMNS": + case 1: + message.types[i] = 1; + break; + case "REMOVED_COLUMNS": + case 2: + message.types[i] = 2; + break; + } + } + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.frequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.frequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.frequency = 4; + break; } return message; }; /** - * Creates a plain object from an OrConditions message. Also converts values to other types if specified. + * Creates a plain object from a SchemaModifiedCadence message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static - * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} message OrConditions + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} message SchemaModifiedCadence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OrConditions.toObject = function toObject(message, options) { + SchemaModifiedCadence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.minRowCount = 0; - object.minAge = null; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) + object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification[message.types[j]] : message.types[j]; } - if (message.minRowCount != null && message.hasOwnProperty("minRowCount")) - object.minRowCount = message.minRowCount; - if (message.minAge != null && message.hasOwnProperty("minAge")) - object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; return object; }; /** - * Converts this OrConditions to JSON. + * Converts this SchemaModifiedCadence to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @instance * @returns {Object.} JSON object */ - OrConditions.prototype.toJSON = function toJSON() { + SchemaModifiedCadence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OrConditions + * Gets the default type url for SchemaModifiedCadence * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OrConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SchemaModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence"; }; - return OrConditions; + /** + * CloudSqlSchemaModification enum. + * @name google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification + * @enum {number} + * @property {number} SQL_SCHEMA_MODIFICATION_UNSPECIFIED=0 SQL_SCHEMA_MODIFICATION_UNSPECIFIED value + * @property {number} NEW_COLUMNS=1 NEW_COLUMNS value + * @property {number} REMOVED_COLUMNS=2 REMOVED_COLUMNS value + */ + SchemaModifiedCadence.CloudSqlSchemaModification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQL_SCHEMA_MODIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEW_COLUMNS"] = 1; + values[valuesById[2] = "REMOVED_COLUMNS"] = 2; + return values; + })(); + + return SchemaModifiedCadence; })(); - return DiscoveryBigQueryConditions; + return DiscoveryCloudSqlGenerationCadence; })(); - v2.DiscoveryGenerationCadence = (function() { + v2.SecretsDiscoveryTarget = (function() { /** - * Properties of a DiscoveryGenerationCadence. + * Properties of a SecretsDiscoveryTarget. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryGenerationCadence - * @property {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null} [schemaModifiedCadence] DiscoveryGenerationCadence schemaModifiedCadence - * @property {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null} [tableModifiedCadence] DiscoveryGenerationCadence tableModifiedCadence - * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryGenerationCadence inspectTemplateModifiedCadence - * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryGenerationCadence refreshFrequency + * @interface ISecretsDiscoveryTarget */ /** - * Constructs a new DiscoveryGenerationCadence. + * Constructs a new SecretsDiscoveryTarget. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryGenerationCadence. - * @implements IDiscoveryGenerationCadence + * @classdesc Represents a SecretsDiscoveryTarget. + * @implements ISecretsDiscoveryTarget * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget=} [properties] Properties to set */ - function DiscoveryGenerationCadence(properties) { + function SecretsDiscoveryTarget(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -55934,119 +60383,63 @@ } /** - * DiscoveryGenerationCadence schemaModifiedCadence. - * @member {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null|undefined} schemaModifiedCadence - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence - * @instance - */ - DiscoveryGenerationCadence.prototype.schemaModifiedCadence = null; - - /** - * DiscoveryGenerationCadence tableModifiedCadence. - * @member {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null|undefined} tableModifiedCadence - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence - * @instance - */ - DiscoveryGenerationCadence.prototype.tableModifiedCadence = null; - - /** - * DiscoveryGenerationCadence inspectTemplateModifiedCadence. - * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence - * @instance - */ - DiscoveryGenerationCadence.prototype.inspectTemplateModifiedCadence = null; - - /** - * DiscoveryGenerationCadence refreshFrequency. - * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence - * @instance - */ - DiscoveryGenerationCadence.prototype.refreshFrequency = 0; - - /** - * Creates a new DiscoveryGenerationCadence instance using the specified properties. + * Creates a new SecretsDiscoveryTarget instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence instance + * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget instance */ - DiscoveryGenerationCadence.create = function create(properties) { - return new DiscoveryGenerationCadence(properties); + SecretsDiscoveryTarget.create = function create(properties) { + return new SecretsDiscoveryTarget(properties); }; /** - * Encodes the specified DiscoveryGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryGenerationCadence.verify|verify} messages. + * Encodes the specified SecretsDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.SecretsDiscoveryTarget.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence} message DiscoveryGenerationCadence message or plain object to encode + * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget} message SecretsDiscoveryTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryGenerationCadence.encode = function encode(message, writer) { + SecretsDiscoveryTarget.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.schemaModifiedCadence != null && Object.hasOwnProperty.call(message, "schemaModifiedCadence")) - $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.encode(message.schemaModifiedCadence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.tableModifiedCadence != null && Object.hasOwnProperty.call(message, "tableModifiedCadence")) - $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.encode(message.tableModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) - $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.refreshFrequency); return writer; }; /** - * Encodes the specified DiscoveryGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryGenerationCadence.verify|verify} messages. + * Encodes the specified SecretsDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SecretsDiscoveryTarget.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence} message DiscoveryGenerationCadence message or plain object to encode + * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget} message SecretsDiscoveryTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { + SecretsDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryGenerationCadence message from the specified reader or buffer. + * Decodes a SecretsDiscoveryTarget message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence + * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryGenerationCadence.decode = function decode(reader, length) { + SecretsDiscoveryTarget.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryGenerationCadence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SecretsDiscoveryTarget(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.decode(reader, reader.uint32()); - break; - } - case 2: { - message.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.decode(reader, reader.uint32()); - break; - } - case 3: { - message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32()); - break; - } - case 4: { - message.refreshFrequency = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -56056,193 +60449,112 @@ }; /** - * Decodes a DiscoveryGenerationCadence message from the specified reader or buffer, length delimited. + * Decodes a SecretsDiscoveryTarget message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence + * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryGenerationCadence.decodeDelimited = function decodeDelimited(reader) { + SecretsDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryGenerationCadence message. + * Verifies a SecretsDiscoveryTarget message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryGenerationCadence.verify = function verify(message) { + SecretsDiscoveryTarget.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) { - var error = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify(message.schemaModifiedCadence); - if (error) - return "schemaModifiedCadence." + error; - } - if (message.tableModifiedCadence != null && message.hasOwnProperty("tableModifiedCadence")) { - var error = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify(message.tableModifiedCadence); - if (error) - return "tableModifiedCadence." + error; - } - if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { - var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence); - if (error) - return "inspectTemplateModifiedCadence." + error; - } - if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) - switch (message.refreshFrequency) { - default: - return "refreshFrequency: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } return null; }; /** - * Creates a DiscoveryGenerationCadence message from a plain object. Also converts values to their respective internal types. + * Creates a SecretsDiscoveryTarget message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence + * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget */ - DiscoveryGenerationCadence.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryGenerationCadence) + SecretsDiscoveryTarget.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.SecretsDiscoveryTarget) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryGenerationCadence(); - if (object.schemaModifiedCadence != null) { - if (typeof object.schemaModifiedCadence !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.schemaModifiedCadence: object expected"); - message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.fromObject(object.schemaModifiedCadence); - } - if (object.tableModifiedCadence != null) { - if (typeof object.tableModifiedCadence !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.tableModifiedCadence: object expected"); - message.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.fromObject(object.tableModifiedCadence); - } - if (object.inspectTemplateModifiedCadence != null) { - if (typeof object.inspectTemplateModifiedCadence !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.inspectTemplateModifiedCadence: object expected"); - message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence); - } - switch (object.refreshFrequency) { - default: - if (typeof object.refreshFrequency === "number") { - message.refreshFrequency = object.refreshFrequency; - break; - } - break; - case "UPDATE_FREQUENCY_UNSPECIFIED": - case 0: - message.refreshFrequency = 0; - break; - case "UPDATE_FREQUENCY_NEVER": - case 1: - message.refreshFrequency = 1; - break; - case "UPDATE_FREQUENCY_DAILY": - case 2: - message.refreshFrequency = 2; - break; - case "UPDATE_FREQUENCY_MONTHLY": - case 4: - message.refreshFrequency = 4; - break; - } - return message; + return new $root.google.privacy.dlp.v2.SecretsDiscoveryTarget(); }; /** - * Creates a plain object from a DiscoveryGenerationCadence message. Also converts values to other types if specified. + * Creates a plain object from a SecretsDiscoveryTarget message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.DiscoveryGenerationCadence} message DiscoveryGenerationCadence + * @param {google.privacy.dlp.v2.SecretsDiscoveryTarget} message SecretsDiscoveryTarget * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryGenerationCadence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.schemaModifiedCadence = null; - object.tableModifiedCadence = null; - object.inspectTemplateModifiedCadence = null; - object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; - } - if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) - object.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.toObject(message.schemaModifiedCadence, options); - if (message.tableModifiedCadence != null && message.hasOwnProperty("tableModifiedCadence")) - object.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.toObject(message.tableModifiedCadence, options); - if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) - object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); - if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) - object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; - return object; + SecretsDiscoveryTarget.toObject = function toObject() { + return {}; }; /** - * Converts this DiscoveryGenerationCadence to JSON. + * Converts this SecretsDiscoveryTarget to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @instance * @returns {Object.} JSON object */ - DiscoveryGenerationCadence.prototype.toJSON = function toJSON() { + SecretsDiscoveryTarget.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryGenerationCadence + * Gets the default type url for SecretsDiscoveryTarget * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SecretsDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryGenerationCadence"; + return typeUrlPrefix + "/google.privacy.dlp.v2.SecretsDiscoveryTarget"; }; - return DiscoveryGenerationCadence; + return SecretsDiscoveryTarget; })(); - v2.DiscoveryTableModifiedCadence = (function() { + v2.CloudStorageDiscoveryTarget = (function() { /** - * Properties of a DiscoveryTableModifiedCadence. + * Properties of a CloudStorageDiscoveryTarget. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryTableModifiedCadence - * @property {Array.|null} [types] DiscoveryTableModifiedCadence types - * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoveryTableModifiedCadence frequency + * @interface ICloudStorageDiscoveryTarget + * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter|null} [filter] CloudStorageDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryFileStoreConditions|null} [conditions] CloudStorageDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence|null} [generationCadence] CloudStorageDiscoveryTarget generationCadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] CloudStorageDiscoveryTarget disabled */ /** - * Constructs a new DiscoveryTableModifiedCadence. + * Constructs a new CloudStorageDiscoveryTarget. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryTableModifiedCadence. - * @implements IDiscoveryTableModifiedCadence + * @classdesc Represents a CloudStorageDiscoveryTarget. + * @implements ICloudStorageDiscoveryTarget * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget=} [properties] Properties to set */ - function DiscoveryTableModifiedCadence(properties) { - this.types = []; + function CloudStorageDiscoveryTarget(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56250,100 +60562,131 @@ } /** - * DiscoveryTableModifiedCadence types. - * @member {Array.} types - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * CloudStorageDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @instance */ - DiscoveryTableModifiedCadence.prototype.types = $util.emptyArray; + CloudStorageDiscoveryTarget.prototype.filter = null; /** - * DiscoveryTableModifiedCadence frequency. - * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * CloudStorageDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryFileStoreConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @instance */ - DiscoveryTableModifiedCadence.prototype.frequency = 0; + CloudStorageDiscoveryTarget.prototype.conditions = null; /** - * Creates a new DiscoveryTableModifiedCadence instance using the specified properties. + * CloudStorageDiscoveryTarget generationCadence. + * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence|null|undefined} generationCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + */ + CloudStorageDiscoveryTarget.prototype.generationCadence = null; + + /** + * CloudStorageDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + */ + CloudStorageDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudStorageDiscoveryTarget cadence. + * @member {"generationCadence"|"disabled"|undefined} cadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + */ + Object.defineProperty(CloudStorageDiscoveryTarget.prototype, "cadence", { + get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudStorageDiscoveryTarget instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence instance + * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget instance */ - DiscoveryTableModifiedCadence.create = function create(properties) { - return new DiscoveryTableModifiedCadence(properties); + CloudStorageDiscoveryTarget.create = function create(properties) { + return new CloudStorageDiscoveryTarget(properties); }; /** - * Encodes the specified DiscoveryTableModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify|verify} messages. + * Encodes the specified CloudStorageDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence message or plain object to encode + * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryTableModifiedCadence.encode = function encode(message, writer) { + CloudStorageDiscoveryTarget.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.types != null && message.types.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.types.length; ++i) - writer.int32(message.types[i]); - writer.ldelim(); - } - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) + $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.encode(message.conditions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryTableModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify|verify} messages. + * Encodes the specified CloudStorageDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence message or plain object to encode + * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryTableModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { + CloudStorageDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryTableModifiedCadence message from the specified reader or buffer. + * Decodes a CloudStorageDiscoveryTarget message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence + * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryTableModifiedCadence.decode = function decode(reader, length) { + CloudStorageDiscoveryTarget.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget(); while (reader.pos < end) { var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.types && message.types.length)) - message.types = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.types.push(reader.int32()); - } else - message.types.push(reader.int32()); + switch (tag >>> 3) { + case 1: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.decode(reader, reader.uint32()); + break; + } + case 4: { + message.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.decode(reader, reader.uint32()); break; } case 2: { - message.frequency = reader.int32(); + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.decode(reader, reader.uint32()); + break; + } + case 3: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32()); break; } default: @@ -56355,207 +60698,182 @@ }; /** - * Decodes a DiscoveryTableModifiedCadence message from the specified reader or buffer, length delimited. + * Decodes a CloudStorageDiscoveryTarget message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence + * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryTableModifiedCadence.decodeDelimited = function decodeDelimited(reader) { + CloudStorageDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryTableModifiedCadence message. + * Verifies a CloudStorageDiscoveryTarget message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryTableModifiedCadence.verify = function verify(message) { + CloudStorageDiscoveryTarget.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - switch (message.types[i]) { - default: - return "types: enum value[] expected"; - case 0: - case 1: - break; - } + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify(message.filter); + if (error) + return "filter." + error; } - if (message.frequency != null && message.hasOwnProperty("frequency")) - switch (message.frequency) { - default: - return "frequency: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify(message.conditions); + if (error) + return "conditions." + error; + } + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify(message.generationCadence); + if (error) + return "generationCadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.cadence === 1) + return "cadence: multiple values"; + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled); + if (error) + return "disabled." + error; } + } return null; }; /** - * Creates a DiscoveryTableModifiedCadence message from a plain object. Also converts values to their respective internal types. + * Creates a CloudStorageDiscoveryTarget message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence + * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget */ - DiscoveryTableModifiedCadence.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence) + CloudStorageDiscoveryTarget.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence(); - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryTableModifiedCadence.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - switch (object.types[i]) { - default: - if (typeof object.types[i] === "number") { - message.types[i] = object.types[i]; - break; - } - case "TABLE_MODIFICATION_UNSPECIFIED": - case 0: - message.types[i] = 0; - break; - case "TABLE_MODIFIED_TIMESTAMP": - case 1: - message.types[i] = 1; - break; - } + var message = new $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget(); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.fromObject(object.filter); } - switch (object.frequency) { - default: - if (typeof object.frequency === "number") { - message.frequency = object.frequency; - break; - } - break; - case "UPDATE_FREQUENCY_UNSPECIFIED": - case 0: - message.frequency = 0; - break; - case "UPDATE_FREQUENCY_NEVER": - case 1: - message.frequency = 1; - break; - case "UPDATE_FREQUENCY_DAILY": - case 2: - message.frequency = 2; - break; - case "UPDATE_FREQUENCY_MONTHLY": - case 4: - message.frequency = 4; - break; + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.fromObject(object.conditions); + } + if (object.generationCadence != null) { + if (typeof object.generationCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.generationCadence: object expected"); + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.fromObject(object.generationCadence); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled); } return message; }; /** - * Creates a plain object from a DiscoveryTableModifiedCadence message. Also converts values to other types if specified. + * Creates a plain object from a CloudStorageDiscoveryTarget message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence + * @param {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryTableModifiedCadence.toObject = function toObject(message, options) { + CloudStorageDiscoveryTarget.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.types = []; - if (options.defaults) - object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQueryTableModification[message.types[j]] : message.types[j]; + if (options.defaults) { + object.filter = null; + object.conditions = null; } - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.toObject(message.filter, options); + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.toObject(message.generationCadence, options); + if (options.oneofs) + object.cadence = "generationCadence"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.cadence = "disabled"; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.toObject(message.conditions, options); return object; }; /** - * Converts this DiscoveryTableModifiedCadence to JSON. + * Converts this CloudStorageDiscoveryTarget to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @instance * @returns {Object.} JSON object */ - DiscoveryTableModifiedCadence.prototype.toJSON = function toJSON() { + CloudStorageDiscoveryTarget.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryTableModifiedCadence + * Gets the default type url for CloudStorageDiscoveryTarget * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryTableModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudStorageDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryTableModifiedCadence"; + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageDiscoveryTarget"; }; - return DiscoveryTableModifiedCadence; - })(); - - /** - * BigQueryTableModification enum. - * @name google.privacy.dlp.v2.BigQueryTableModification - * @enum {number} - * @property {number} TABLE_MODIFICATION_UNSPECIFIED=0 TABLE_MODIFICATION_UNSPECIFIED value - * @property {number} TABLE_MODIFIED_TIMESTAMP=1 TABLE_MODIFIED_TIMESTAMP value - */ - v2.BigQueryTableModification = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TABLE_MODIFICATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "TABLE_MODIFIED_TIMESTAMP"] = 1; - return values; + return CloudStorageDiscoveryTarget; })(); - v2.DiscoverySchemaModifiedCadence = (function() { + v2.DiscoveryCloudStorageFilter = (function() { /** - * Properties of a DiscoverySchemaModifiedCadence. + * Properties of a DiscoveryCloudStorageFilter. * @memberof google.privacy.dlp.v2 - * @interface IDiscoverySchemaModifiedCadence - * @property {Array.|null} [types] DiscoverySchemaModifiedCadence types - * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoverySchemaModifiedCadence frequency + * @interface IDiscoveryCloudStorageFilter + * @property {google.privacy.dlp.v2.IFileStoreCollection|null} [collection] DiscoveryCloudStorageFilter collection + * @property {google.privacy.dlp.v2.ICloudStorageResourceReference|null} [cloudStorageResourceReference] DiscoveryCloudStorageFilter cloudStorageResourceReference + * @property {google.privacy.dlp.v2.IAllOtherResources|null} [others] DiscoveryCloudStorageFilter others */ /** - * Constructs a new DiscoverySchemaModifiedCadence. + * Constructs a new DiscoveryCloudStorageFilter. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoverySchemaModifiedCadence. - * @implements IDiscoverySchemaModifiedCadence + * @classdesc Represents a DiscoveryCloudStorageFilter. + * @implements IDiscoveryCloudStorageFilter * @constructor - * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter=} [properties] Properties to set */ - function DiscoverySchemaModifiedCadence(properties) { - this.types = []; + function DiscoveryCloudStorageFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56563,100 +60881,117 @@ } /** - * DiscoverySchemaModifiedCadence types. - * @member {Array.} types - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * DiscoveryCloudStorageFilter collection. + * @member {google.privacy.dlp.v2.IFileStoreCollection|null|undefined} collection + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @instance + */ + DiscoveryCloudStorageFilter.prototype.collection = null; + + /** + * DiscoveryCloudStorageFilter cloudStorageResourceReference. + * @member {google.privacy.dlp.v2.ICloudStorageResourceReference|null|undefined} cloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @instance + */ + DiscoveryCloudStorageFilter.prototype.cloudStorageResourceReference = null; + + /** + * DiscoveryCloudStorageFilter others. + * @member {google.privacy.dlp.v2.IAllOtherResources|null|undefined} others + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @instance */ - DiscoverySchemaModifiedCadence.prototype.types = $util.emptyArray; + DiscoveryCloudStorageFilter.prototype.others = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DiscoverySchemaModifiedCadence frequency. - * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * DiscoveryCloudStorageFilter filter. + * @member {"collection"|"cloudStorageResourceReference"|"others"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @instance */ - DiscoverySchemaModifiedCadence.prototype.frequency = 0; + Object.defineProperty(DiscoveryCloudStorageFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["collection", "cloudStorageResourceReference", "others"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DiscoverySchemaModifiedCadence instance using the specified properties. + * Creates a new DiscoveryCloudStorageFilter instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static - * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence instance + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter instance */ - DiscoverySchemaModifiedCadence.create = function create(properties) { - return new DiscoverySchemaModifiedCadence(properties); + DiscoveryCloudStorageFilter.create = function create(properties) { + return new DiscoveryCloudStorageFilter(properties); }; /** - * Encodes the specified DiscoverySchemaModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify|verify} messages. + * Encodes the specified DiscoveryCloudStorageFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static - * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoverySchemaModifiedCadence.encode = function encode(message, writer) { + DiscoveryCloudStorageFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.types != null && message.types.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.types.length; ++i) - writer.int32(message.types[i]); - writer.ldelim(); - } - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); + if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) + $root.google.privacy.dlp.v2.FileStoreCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudStorageResourceReference != null && Object.hasOwnProperty.call(message, "cloudStorageResourceReference")) + $root.google.privacy.dlp.v2.CloudStorageResourceReference.encode(message.cloudStorageResourceReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.others != null && Object.hasOwnProperty.call(message, "others")) + $root.google.privacy.dlp.v2.AllOtherResources.encode(message.others, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoverySchemaModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify|verify} messages. + * Encodes the specified DiscoveryCloudStorageFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static - * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoverySchemaModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryCloudStorageFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoverySchemaModifiedCadence message from the specified reader or buffer. + * Decodes a DiscoveryCloudStorageFilter message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoverySchemaModifiedCadence.decode = function decode(reader, length) { + DiscoveryCloudStorageFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.types && message.types.length)) - message.types = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.types.push(reader.int32()); - } else - message.types.push(reader.int32()); + message.collection = $root.google.privacy.dlp.v2.FileStoreCollection.decode(reader, reader.uint32()); break; } case 2: { - message.frequency = reader.int32(); + message.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.decode(reader, reader.uint32()); + break; + } + case 100: { + message.others = $root.google.privacy.dlp.v2.AllOtherResources.decode(reader, reader.uint32()); break; } default: @@ -56668,212 +61003,172 @@ }; /** - * Decodes a DiscoverySchemaModifiedCadence message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryCloudStorageFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoverySchemaModifiedCadence.decodeDelimited = function decodeDelimited(reader) { + DiscoveryCloudStorageFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoverySchemaModifiedCadence message. + * Verifies a DiscoveryCloudStorageFilter message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoverySchemaModifiedCadence.verify = function verify(message) { + DiscoveryCloudStorageFilter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - switch (message.types[i]) { - default: - return "types: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } + var properties = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.FileStoreCollection.verify(message.collection); + if (error) + return "collection." + error; + } } - if (message.frequency != null && message.hasOwnProperty("frequency")) - switch (message.frequency) { - default: - return "frequency: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; + if (message.cloudStorageResourceReference != null && message.hasOwnProperty("cloudStorageResourceReference")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStorageResourceReference.verify(message.cloudStorageResourceReference); + if (error) + return "cloudStorageResourceReference." + error; + } + } + if (message.others != null && message.hasOwnProperty("others")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.AllOtherResources.verify(message.others); + if (error) + return "others." + error; } + } return null; }; /** - * Creates a DiscoverySchemaModifiedCadence message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryCloudStorageFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter */ - DiscoverySchemaModifiedCadence.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence) + DiscoveryCloudStorageFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter) return object; - var message = new $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence(); - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - switch (object.types[i]) { - default: - if (typeof object.types[i] === "number") { - message.types[i] = object.types[i]; - break; - } - case "SCHEMA_MODIFICATION_UNSPECIFIED": - case 0: - message.types[i] = 0; - break; - case "SCHEMA_NEW_COLUMNS": - case 1: - message.types[i] = 1; - break; - case "SCHEMA_REMOVED_COLUMNS": - case 2: - message.types[i] = 2; - break; - } + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter(); + if (object.collection != null) { + if (typeof object.collection !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.collection: object expected"); + message.collection = $root.google.privacy.dlp.v2.FileStoreCollection.fromObject(object.collection); } - switch (object.frequency) { - default: - if (typeof object.frequency === "number") { - message.frequency = object.frequency; - break; - } - break; - case "UPDATE_FREQUENCY_UNSPECIFIED": - case 0: - message.frequency = 0; - break; - case "UPDATE_FREQUENCY_NEVER": - case 1: - message.frequency = 1; - break; - case "UPDATE_FREQUENCY_DAILY": - case 2: - message.frequency = 2; - break; - case "UPDATE_FREQUENCY_MONTHLY": - case 4: - message.frequency = 4; - break; + if (object.cloudStorageResourceReference != null) { + if (typeof object.cloudStorageResourceReference !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.cloudStorageResourceReference: object expected"); + message.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.fromObject(object.cloudStorageResourceReference); + } + if (object.others != null) { + if (typeof object.others !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.others: object expected"); + message.others = $root.google.privacy.dlp.v2.AllOtherResources.fromObject(object.others); } return message; }; /** - * Creates a plain object from a DiscoverySchemaModifiedCadence message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryCloudStorageFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static - * @param {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence + * @param {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoverySchemaModifiedCadence.toObject = function toObject(message, options) { + DiscoveryCloudStorageFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.types = []; - if (options.defaults) - object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQuerySchemaModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQuerySchemaModification[message.types[j]] : message.types[j]; + if (message.collection != null && message.hasOwnProperty("collection")) { + object.collection = $root.google.privacy.dlp.v2.FileStoreCollection.toObject(message.collection, options); + if (options.oneofs) + object.filter = "collection"; + } + if (message.cloudStorageResourceReference != null && message.hasOwnProperty("cloudStorageResourceReference")) { + object.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.toObject(message.cloudStorageResourceReference, options); + if (options.oneofs) + object.filter = "cloudStorageResourceReference"; + } + if (message.others != null && message.hasOwnProperty("others")) { + object.others = $root.google.privacy.dlp.v2.AllOtherResources.toObject(message.others, options); + if (options.oneofs) + object.filter = "others"; } - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; return object; }; /** - * Converts this DiscoverySchemaModifiedCadence to JSON. + * Converts this DiscoveryCloudStorageFilter to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @instance * @returns {Object.} JSON object */ - DiscoverySchemaModifiedCadence.prototype.toJSON = function toJSON() { + DiscoveryCloudStorageFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoverySchemaModifiedCadence + * Gets the default type url for DiscoveryCloudStorageFilter * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoverySchemaModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryCloudStorageFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoverySchemaModifiedCadence"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageFilter"; }; - return DiscoverySchemaModifiedCadence; - })(); - - /** - * BigQuerySchemaModification enum. - * @name google.privacy.dlp.v2.BigQuerySchemaModification - * @enum {number} - * @property {number} SCHEMA_MODIFICATION_UNSPECIFIED=0 SCHEMA_MODIFICATION_UNSPECIFIED value - * @property {number} SCHEMA_NEW_COLUMNS=1 SCHEMA_NEW_COLUMNS value - * @property {number} SCHEMA_REMOVED_COLUMNS=2 SCHEMA_REMOVED_COLUMNS value - */ - v2.BigQuerySchemaModification = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCHEMA_MODIFICATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "SCHEMA_NEW_COLUMNS"] = 1; - values[valuesById[2] = "SCHEMA_REMOVED_COLUMNS"] = 2; - return values; + return DiscoveryCloudStorageFilter; })(); - v2.DiscoveryInspectTemplateModifiedCadence = (function() { + v2.FileStoreCollection = (function() { /** - * Properties of a DiscoveryInspectTemplateModifiedCadence. + * Properties of a FileStoreCollection. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryInspectTemplateModifiedCadence - * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoveryInspectTemplateModifiedCadence frequency + * @interface IFileStoreCollection + * @property {google.privacy.dlp.v2.IFileStoreRegexes|null} [includeRegexes] FileStoreCollection includeRegexes */ /** - * Constructs a new DiscoveryInspectTemplateModifiedCadence. + * Constructs a new FileStoreCollection. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryInspectTemplateModifiedCadence. - * @implements IDiscoveryInspectTemplateModifiedCadence + * @classdesc Represents a FileStoreCollection. + * @implements IFileStoreCollection * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IFileStoreCollection=} [properties] Properties to set */ - function DiscoveryInspectTemplateModifiedCadence(properties) { + function FileStoreCollection(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56881,75 +61176,89 @@ } /** - * DiscoveryInspectTemplateModifiedCadence frequency. - * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * FileStoreCollection includeRegexes. + * @member {google.privacy.dlp.v2.IFileStoreRegexes|null|undefined} includeRegexes + * @memberof google.privacy.dlp.v2.FileStoreCollection * @instance */ - DiscoveryInspectTemplateModifiedCadence.prototype.frequency = 0; + FileStoreCollection.prototype.includeRegexes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new DiscoveryInspectTemplateModifiedCadence instance using the specified properties. + * FileStoreCollection pattern. + * @member {"includeRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @instance + */ + Object.defineProperty(FileStoreCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FileStoreCollection instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static - * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence instance + * @param {google.privacy.dlp.v2.IFileStoreCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection instance */ - DiscoveryInspectTemplateModifiedCadence.create = function create(properties) { - return new DiscoveryInspectTemplateModifiedCadence(properties); + FileStoreCollection.create = function create(properties) { + return new FileStoreCollection(properties); }; /** - * Encodes the specified DiscoveryInspectTemplateModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify|verify} messages. + * Encodes the specified FileStoreCollection message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreCollection.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static - * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence message or plain object to encode + * @param {google.privacy.dlp.v2.IFileStoreCollection} message FileStoreCollection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryInspectTemplateModifiedCadence.encode = function encode(message, writer) { + FileStoreCollection.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.frequency); + if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) + $root.google.privacy.dlp.v2.FileStoreRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryInspectTemplateModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify|verify} messages. + * Encodes the specified FileStoreCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreCollection.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static - * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence message or plain object to encode + * @param {google.privacy.dlp.v2.IFileStoreCollection} message FileStoreCollection message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryInspectTemplateModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { + FileStoreCollection.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryInspectTemplateModifiedCadence message from the specified reader or buffer. + * Decodes a FileStoreCollection message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence + * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryInspectTemplateModifiedCadence.decode = function decode(reader, length) { + FileStoreCollection.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreCollection(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.frequency = reader.int32(); + message.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.decode(reader, reader.uint32()); break; } default: @@ -56961,286 +61270,212 @@ }; /** - * Decodes a DiscoveryInspectTemplateModifiedCadence message from the specified reader or buffer, length delimited. + * Decodes a FileStoreCollection message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence + * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryInspectTemplateModifiedCadence.decodeDelimited = function decodeDelimited(reader) { + FileStoreCollection.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryInspectTemplateModifiedCadence message. + * Verifies a FileStoreCollection message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryInspectTemplateModifiedCadence.verify = function verify(message) { + FileStoreCollection.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.frequency != null && message.hasOwnProperty("frequency")) - switch (message.frequency) { - default: - return "frequency: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; + var properties = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.FileStoreRegexes.verify(message.includeRegexes); + if (error) + return "includeRegexes." + error; } + } return null; }; /** - * Creates a DiscoveryInspectTemplateModifiedCadence message from a plain object. Also converts values to their respective internal types. + * Creates a FileStoreCollection message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence + * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection */ - DiscoveryInspectTemplateModifiedCadence.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence) + FileStoreCollection.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.FileStoreCollection) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence(); - switch (object.frequency) { - default: - if (typeof object.frequency === "number") { - message.frequency = object.frequency; - break; - } - break; - case "UPDATE_FREQUENCY_UNSPECIFIED": - case 0: - message.frequency = 0; - break; - case "UPDATE_FREQUENCY_NEVER": - case 1: - message.frequency = 1; - break; - case "UPDATE_FREQUENCY_DAILY": - case 2: - message.frequency = 2; - break; - case "UPDATE_FREQUENCY_MONTHLY": - case 4: - message.frequency = 4; - break; + var message = new $root.google.privacy.dlp.v2.FileStoreCollection(); + if (object.includeRegexes != null) { + if (typeof object.includeRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreCollection.includeRegexes: object expected"); + message.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.fromObject(object.includeRegexes); } return message; }; /** - * Creates a plain object from a DiscoveryInspectTemplateModifiedCadence message. Also converts values to other types if specified. + * Creates a plain object from a FileStoreCollection message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static - * @param {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence + * @param {google.privacy.dlp.v2.FileStoreCollection} message FileStoreCollection * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryInspectTemplateModifiedCadence.toObject = function toObject(message, options) { + FileStoreCollection.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + object.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.toObject(message.includeRegexes, options); + if (options.oneofs) + object.pattern = "includeRegexes"; + } return object; }; /** - * Converts this DiscoveryInspectTemplateModifiedCadence to JSON. + * Converts this FileStoreCollection to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @instance * @returns {Object.} JSON object */ - DiscoveryInspectTemplateModifiedCadence.prototype.toJSON = function toJSON() { + FileStoreCollection.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryInspectTemplateModifiedCadence + * Gets the default type url for FileStoreCollection * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.FileStoreCollection * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryInspectTemplateModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileStoreCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence"; + return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreCollection"; }; - return DiscoveryInspectTemplateModifiedCadence; - })(); - - v2.CloudSqlDiscoveryTarget = (function() { - - /** - * Properties of a CloudSqlDiscoveryTarget. - * @memberof google.privacy.dlp.v2 - * @interface ICloudSqlDiscoveryTarget - * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter|null} [filter] CloudSqlDiscoveryTarget filter - * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions|null} [conditions] CloudSqlDiscoveryTarget conditions - * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence|null} [generationCadence] CloudSqlDiscoveryTarget generationCadence - * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] CloudSqlDiscoveryTarget disabled - */ - - /** - * Constructs a new CloudSqlDiscoveryTarget. - * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CloudSqlDiscoveryTarget. - * @implements ICloudSqlDiscoveryTarget - * @constructor - * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget=} [properties] Properties to set - */ - function CloudSqlDiscoveryTarget(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudSqlDiscoveryTarget filter. - * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter|null|undefined} filter - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget - * @instance - */ - CloudSqlDiscoveryTarget.prototype.filter = null; - - /** - * CloudSqlDiscoveryTarget conditions. - * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions|null|undefined} conditions - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget - * @instance - */ - CloudSqlDiscoveryTarget.prototype.conditions = null; + return FileStoreCollection; + })(); + + v2.FileStoreRegexes = (function() { /** - * CloudSqlDiscoveryTarget generationCadence. - * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence|null|undefined} generationCadence - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget - * @instance + * Properties of a FileStoreRegexes. + * @memberof google.privacy.dlp.v2 + * @interface IFileStoreRegexes + * @property {Array.|null} [patterns] FileStoreRegexes patterns */ - CloudSqlDiscoveryTarget.prototype.generationCadence = null; /** - * CloudSqlDiscoveryTarget disabled. - * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget - * @instance + * Constructs a new FileStoreRegexes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileStoreRegexes. + * @implements IFileStoreRegexes + * @constructor + * @param {google.privacy.dlp.v2.IFileStoreRegexes=} [properties] Properties to set */ - CloudSqlDiscoveryTarget.prototype.disabled = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + function FileStoreRegexes(properties) { + this.patterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * CloudSqlDiscoveryTarget cadence. - * @member {"generationCadence"|"disabled"|undefined} cadence - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * FileStoreRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @instance */ - Object.defineProperty(CloudSqlDiscoveryTarget.prototype, "cadence", { - get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), - set: $util.oneOfSetter($oneOfFields) - }); + FileStoreRegexes.prototype.patterns = $util.emptyArray; /** - * Creates a new CloudSqlDiscoveryTarget instance using the specified properties. + * Creates a new FileStoreRegexes instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static - * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget instance + * @param {google.privacy.dlp.v2.IFileStoreRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes instance */ - CloudSqlDiscoveryTarget.create = function create(properties) { - return new CloudSqlDiscoveryTarget(properties); + FileStoreRegexes.create = function create(properties) { + return new FileStoreRegexes(properties); }; /** - * Encodes the specified CloudSqlDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify|verify} messages. + * Encodes the specified FileStoreRegexes message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegexes.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static - * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IFileStoreRegexes} message FileStoreRegexes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlDiscoveryTarget.encode = function encode(message, writer) { + FileStoreRegexes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) - $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.encode(message.conditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) - $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.FileStoreRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudSqlDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify|verify} messages. + * Encodes the specified FileStoreRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegexes.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static - * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IFileStoreRegexes} message FileStoreRegexes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudSqlDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + FileStoreRegexes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudSqlDiscoveryTarget message from the specified reader or buffer. + * Decodes a FileStoreRegexes message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget + * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlDiscoveryTarget.decode = function decode(reader, length) { + FileStoreRegexes.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreRegexes(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.decode(reader, reader.uint32()); - break; - } - case 2: { - message.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.decode(reader, reader.uint32()); - break; - } - case 3: { - message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.decode(reader, reader.uint32()); - break; - } - case 4: { - message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32()); + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.FileStoreRegex.decode(reader, reader.uint32())); break; } default: @@ -57252,182 +61487,139 @@ }; /** - * Decodes a CloudSqlDiscoveryTarget message from the specified reader or buffer, length delimited. + * Decodes a FileStoreRegexes message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget + * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudSqlDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + FileStoreRegexes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudSqlDiscoveryTarget message. + * Verifies a FileStoreRegexes message. * @function verify - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudSqlDiscoveryTarget.verify = function verify(message) { + FileStoreRegexes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.conditions != null && message.hasOwnProperty("conditions")) { - var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify(message.conditions); - if (error) - return "conditions." + error; - } - if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { - properties.cadence = 1; - { - var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify(message.generationCadence); - if (error) - return "generationCadence." + error; - } - } - if (message.disabled != null && message.hasOwnProperty("disabled")) { - if (properties.cadence === 1) - return "cadence: multiple values"; - properties.cadence = 1; - { - var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled); + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.FileStoreRegex.verify(message.patterns[i]); if (error) - return "disabled." + error; + return "patterns." + error; } } return null; }; /** - * Creates a CloudSqlDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * Creates a FileStoreRegexes message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget + * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes */ - CloudSqlDiscoveryTarget.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget) + FileStoreRegexes.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.FileStoreRegexes) return object; - var message = new $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget(); - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.filter: object expected"); - message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.fromObject(object.filter); - } - if (object.conditions != null) { - if (typeof object.conditions !== "object") - throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.conditions: object expected"); - message.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.fromObject(object.conditions); - } - if (object.generationCadence != null) { - if (typeof object.generationCadence !== "object") - throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.generationCadence: object expected"); - message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.fromObject(object.generationCadence); - } - if (object.disabled != null) { - if (typeof object.disabled !== "object") - throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.disabled: object expected"); - message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled); + var message = new $root.google.privacy.dlp.v2.FileStoreRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.FileStoreRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.FileStoreRegex.fromObject(object.patterns[i]); + } } return message; }; /** - * Creates a plain object from a CloudSqlDiscoveryTarget message. Also converts values to other types if specified. + * Creates a plain object from a FileStoreRegexes message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static - * @param {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget + * @param {google.privacy.dlp.v2.FileStoreRegexes} message FileStoreRegexes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudSqlDiscoveryTarget.toObject = function toObject(message, options) { + FileStoreRegexes.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.filter = null; - object.conditions = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.toObject(message.filter, options); - if (message.conditions != null && message.hasOwnProperty("conditions")) - object.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.toObject(message.conditions, options); - if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { - object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.toObject(message.generationCadence, options); - if (options.oneofs) - object.cadence = "generationCadence"; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) { - object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); - if (options.oneofs) - object.cadence = "disabled"; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.FileStoreRegex.toObject(message.patterns[j], options); } return object; }; /** - * Converts this CloudSqlDiscoveryTarget to JSON. + * Converts this FileStoreRegexes to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @instance * @returns {Object.} JSON object */ - CloudSqlDiscoveryTarget.prototype.toJSON = function toJSON() { + FileStoreRegexes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudSqlDiscoveryTarget + * Gets the default type url for FileStoreRegexes * @function getTypeUrl - * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @memberof google.privacy.dlp.v2.FileStoreRegexes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudSqlDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileStoreRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.CloudSqlDiscoveryTarget"; + return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreRegexes"; }; - return CloudSqlDiscoveryTarget; + return FileStoreRegexes; })(); - v2.DiscoveryCloudSqlFilter = (function() { + v2.FileStoreRegex = (function() { /** - * Properties of a DiscoveryCloudSqlFilter. + * Properties of a FileStoreRegex. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryCloudSqlFilter - * @property {google.privacy.dlp.v2.IDatabaseResourceCollection|null} [collection] DiscoveryCloudSqlFilter collection - * @property {google.privacy.dlp.v2.IAllOtherDatabaseResources|null} [others] DiscoveryCloudSqlFilter others - * @property {google.privacy.dlp.v2.IDatabaseResourceReference|null} [databaseResourceReference] DiscoveryCloudSqlFilter databaseResourceReference + * @interface IFileStoreRegex + * @property {google.privacy.dlp.v2.ICloudStorageRegex|null} [cloudStorageRegex] FileStoreRegex cloudStorageRegex */ /** - * Constructs a new DiscoveryCloudSqlFilter. + * Constructs a new FileStoreRegex. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryCloudSqlFilter. - * @implements IDiscoveryCloudSqlFilter + * @classdesc Represents a FileStoreRegex. + * @implements IFileStoreRegex * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IFileStoreRegex=} [properties] Properties to set */ - function DiscoveryCloudSqlFilter(properties) { + function FileStoreRegex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57435,117 +61627,89 @@ } /** - * DiscoveryCloudSqlFilter collection. - * @member {google.privacy.dlp.v2.IDatabaseResourceCollection|null|undefined} collection - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter - * @instance - */ - DiscoveryCloudSqlFilter.prototype.collection = null; - - /** - * DiscoveryCloudSqlFilter others. - * @member {google.privacy.dlp.v2.IAllOtherDatabaseResources|null|undefined} others - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter - * @instance - */ - DiscoveryCloudSqlFilter.prototype.others = null; - - /** - * DiscoveryCloudSqlFilter databaseResourceReference. - * @member {google.privacy.dlp.v2.IDatabaseResourceReference|null|undefined} databaseResourceReference - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * FileStoreRegex cloudStorageRegex. + * @member {google.privacy.dlp.v2.ICloudStorageRegex|null|undefined} cloudStorageRegex + * @memberof google.privacy.dlp.v2.FileStoreRegex * @instance */ - DiscoveryCloudSqlFilter.prototype.databaseResourceReference = null; + FileStoreRegex.prototype.cloudStorageRegex = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * DiscoveryCloudSqlFilter filter. - * @member {"collection"|"others"|"databaseResourceReference"|undefined} filter - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * FileStoreRegex resourceRegex. + * @member {"cloudStorageRegex"|undefined} resourceRegex + * @memberof google.privacy.dlp.v2.FileStoreRegex * @instance */ - Object.defineProperty(DiscoveryCloudSqlFilter.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["collection", "others", "databaseResourceReference"]), + Object.defineProperty(FileStoreRegex.prototype, "resourceRegex", { + get: $util.oneOfGetter($oneOfFields = ["cloudStorageRegex"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DiscoveryCloudSqlFilter instance using the specified properties. + * Creates a new FileStoreRegex instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter instance + * @param {google.privacy.dlp.v2.IFileStoreRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex instance */ - DiscoveryCloudSqlFilter.create = function create(properties) { - return new DiscoveryCloudSqlFilter(properties); + FileStoreRegex.create = function create(properties) { + return new FileStoreRegex(properties); }; /** - * Encodes the specified DiscoveryCloudSqlFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify|verify} messages. + * Encodes the specified FileStoreRegex message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegex.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter message or plain object to encode + * @param {google.privacy.dlp.v2.IFileStoreRegex} message FileStoreRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudSqlFilter.encode = function encode(message, writer) { + FileStoreRegex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) - $root.google.privacy.dlp.v2.DatabaseResourceCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.others != null && Object.hasOwnProperty.call(message, "others")) - $root.google.privacy.dlp.v2.AllOtherDatabaseResources.encode(message.others, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.databaseResourceReference != null && Object.hasOwnProperty.call(message, "databaseResourceReference")) - $root.google.privacy.dlp.v2.DatabaseResourceReference.encode(message.databaseResourceReference, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cloudStorageRegex != null && Object.hasOwnProperty.call(message, "cloudStorageRegex")) + $root.google.privacy.dlp.v2.CloudStorageRegex.encode(message.cloudStorageRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryCloudSqlFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify|verify} messages. + * Encodes the specified FileStoreRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegex.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter message or plain object to encode + * @param {google.privacy.dlp.v2.IFileStoreRegex} message FileStoreRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudSqlFilter.encodeDelimited = function encodeDelimited(message, writer) { + FileStoreRegex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryCloudSqlFilter message from the specified reader or buffer. + * Decodes a FileStoreRegex message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter + * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudSqlFilter.decode = function decode(reader, length) { + FileStoreRegex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreRegex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.decode(reader, reader.uint32()); - break; - } - case 2: { - message.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.decode(reader, reader.uint32()); - break; - } - case 3: { - message.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.decode(reader, reader.uint32()); + message.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.decode(reader, reader.uint32()); break; } default: @@ -57557,172 +61721,133 @@ }; /** - * Decodes a DiscoveryCloudSqlFilter message from the specified reader or buffer, length delimited. + * Decodes a FileStoreRegex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter + * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudSqlFilter.decodeDelimited = function decodeDelimited(reader) { + FileStoreRegex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryCloudSqlFilter message. + * Verifies a FileStoreRegex message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryCloudSqlFilter.verify = function verify(message) { + FileStoreRegex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.collection != null && message.hasOwnProperty("collection")) { - properties.filter = 1; - { - var error = $root.google.privacy.dlp.v2.DatabaseResourceCollection.verify(message.collection); - if (error) - return "collection." + error; - } - } - if (message.others != null && message.hasOwnProperty("others")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.verify(message.others); - if (error) - return "others." + error; - } - } - if (message.databaseResourceReference != null && message.hasOwnProperty("databaseResourceReference")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; + if (message.cloudStorageRegex != null && message.hasOwnProperty("cloudStorageRegex")) { + properties.resourceRegex = 1; { - var error = $root.google.privacy.dlp.v2.DatabaseResourceReference.verify(message.databaseResourceReference); + var error = $root.google.privacy.dlp.v2.CloudStorageRegex.verify(message.cloudStorageRegex); if (error) - return "databaseResourceReference." + error; + return "cloudStorageRegex." + error; } } return null; }; /** - * Creates a DiscoveryCloudSqlFilter message from a plain object. Also converts values to their respective internal types. + * Creates a FileStoreRegex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter + * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex */ - DiscoveryCloudSqlFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter) + FileStoreRegex.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.FileStoreRegex) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter(); - if (object.collection != null) { - if (typeof object.collection !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.collection: object expected"); - message.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.fromObject(object.collection); - } - if (object.others != null) { - if (typeof object.others !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.others: object expected"); - message.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.fromObject(object.others); - } - if (object.databaseResourceReference != null) { - if (typeof object.databaseResourceReference !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.databaseResourceReference: object expected"); - message.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.fromObject(object.databaseResourceReference); + var message = new $root.google.privacy.dlp.v2.FileStoreRegex(); + if (object.cloudStorageRegex != null) { + if (typeof object.cloudStorageRegex !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreRegex.cloudStorageRegex: object expected"); + message.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.fromObject(object.cloudStorageRegex); } return message; }; /** - * Creates a plain object from a DiscoveryCloudSqlFilter message. Also converts values to other types if specified. + * Creates a plain object from a FileStoreRegex message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter + * @param {google.privacy.dlp.v2.FileStoreRegex} message FileStoreRegex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryCloudSqlFilter.toObject = function toObject(message, options) { + FileStoreRegex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.collection != null && message.hasOwnProperty("collection")) { - object.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.toObject(message.collection, options); - if (options.oneofs) - object.filter = "collection"; - } - if (message.others != null && message.hasOwnProperty("others")) { - object.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.toObject(message.others, options); - if (options.oneofs) - object.filter = "others"; - } - if (message.databaseResourceReference != null && message.hasOwnProperty("databaseResourceReference")) { - object.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.toObject(message.databaseResourceReference, options); + if (message.cloudStorageRegex != null && message.hasOwnProperty("cloudStorageRegex")) { + object.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.toObject(message.cloudStorageRegex, options); if (options.oneofs) - object.filter = "databaseResourceReference"; + object.resourceRegex = "cloudStorageRegex"; } return object; }; /** - * Converts this DiscoveryCloudSqlFilter to JSON. + * Converts this FileStoreRegex to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @instance * @returns {Object.} JSON object */ - DiscoveryCloudSqlFilter.prototype.toJSON = function toJSON() { + FileStoreRegex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryCloudSqlFilter + * Gets the default type url for FileStoreRegex * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @memberof google.privacy.dlp.v2.FileStoreRegex * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryCloudSqlFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FileStoreRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlFilter"; + return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreRegex"; }; - return DiscoveryCloudSqlFilter; + return FileStoreRegex; })(); - v2.DatabaseResourceCollection = (function() { + v2.CloudStorageRegex = (function() { /** - * Properties of a DatabaseResourceCollection. + * Properties of a CloudStorageRegex. * @memberof google.privacy.dlp.v2 - * @interface IDatabaseResourceCollection - * @property {google.privacy.dlp.v2.IDatabaseResourceRegexes|null} [includeRegexes] DatabaseResourceCollection includeRegexes + * @interface ICloudStorageRegex + * @property {string|null} [projectIdRegex] CloudStorageRegex projectIdRegex + * @property {string|null} [bucketNameRegex] CloudStorageRegex bucketNameRegex */ /** - * Constructs a new DatabaseResourceCollection. + * Constructs a new CloudStorageRegex. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DatabaseResourceCollection. - * @implements IDatabaseResourceCollection + * @classdesc Represents a CloudStorageRegex. + * @implements ICloudStorageRegex * @constructor - * @param {google.privacy.dlp.v2.IDatabaseResourceCollection=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICloudStorageRegex=} [properties] Properties to set */ - function DatabaseResourceCollection(properties) { + function CloudStorageRegex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57730,89 +61855,89 @@ } /** - * DatabaseResourceCollection includeRegexes. - * @member {google.privacy.dlp.v2.IDatabaseResourceRegexes|null|undefined} includeRegexes - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * CloudStorageRegex projectIdRegex. + * @member {string} projectIdRegex + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @instance */ - DatabaseResourceCollection.prototype.includeRegexes = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CloudStorageRegex.prototype.projectIdRegex = ""; /** - * DatabaseResourceCollection pattern. - * @member {"includeRegexes"|undefined} pattern - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * CloudStorageRegex bucketNameRegex. + * @member {string} bucketNameRegex + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @instance */ - Object.defineProperty(DatabaseResourceCollection.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), - set: $util.oneOfSetter($oneOfFields) - }); + CloudStorageRegex.prototype.bucketNameRegex = ""; /** - * Creates a new DatabaseResourceCollection instance using the specified properties. + * Creates a new CloudStorageRegex instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceCollection=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection instance + * @param {google.privacy.dlp.v2.ICloudStorageRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex instance */ - DatabaseResourceCollection.create = function create(properties) { - return new DatabaseResourceCollection(properties); + CloudStorageRegex.create = function create(properties) { + return new CloudStorageRegex(properties); }; /** - * Encodes the specified DatabaseResourceCollection message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceCollection.verify|verify} messages. + * Encodes the specified CloudStorageRegex message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegex.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceCollection} message DatabaseResourceCollection message or plain object to encode + * @param {google.privacy.dlp.v2.ICloudStorageRegex} message CloudStorageRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseResourceCollection.encode = function encode(message, writer) { + CloudStorageRegex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) - $root.google.privacy.dlp.v2.DatabaseResourceRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); + if (message.bucketNameRegex != null && Object.hasOwnProperty.call(message, "bucketNameRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketNameRegex); return writer; }; /** - * Encodes the specified DatabaseResourceCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceCollection.verify|verify} messages. + * Encodes the specified CloudStorageRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegex.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceCollection} message DatabaseResourceCollection message or plain object to encode + * @param {google.privacy.dlp.v2.ICloudStorageRegex} message CloudStorageRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseResourceCollection.encodeDelimited = function encodeDelimited(message, writer) { + CloudStorageRegex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseResourceCollection message from the specified reader or buffer. + * Decodes a CloudStorageRegex message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection + * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseResourceCollection.decode = function decode(reader, length) { + CloudStorageRegex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceCollection(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageRegex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.decode(reader, reader.uint32()); + message.projectIdRegex = reader.string(); + break; + } + case 2: { + message.bucketNameRegex = reader.string(); break; } default: @@ -57824,133 +61949,132 @@ }; /** - * Decodes a DatabaseResourceCollection message from the specified reader or buffer, length delimited. + * Decodes a CloudStorageRegex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection + * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseResourceCollection.decodeDelimited = function decodeDelimited(reader) { + CloudStorageRegex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseResourceCollection message. + * Verifies a CloudStorageRegex message. * @function verify - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseResourceCollection.verify = function verify(message) { + CloudStorageRegex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { - properties.pattern = 1; - { - var error = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.verify(message.includeRegexes); - if (error) - return "includeRegexes." + error; - } - } + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + if (!$util.isString(message.projectIdRegex)) + return "projectIdRegex: string expected"; + if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) + if (!$util.isString(message.bucketNameRegex)) + return "bucketNameRegex: string expected"; return null; }; /** - * Creates a DatabaseResourceCollection message from a plain object. Also converts values to their respective internal types. + * Creates a CloudStorageRegex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection + * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex */ - DatabaseResourceCollection.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceCollection) + CloudStorageRegex.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageRegex) return object; - var message = new $root.google.privacy.dlp.v2.DatabaseResourceCollection(); - if (object.includeRegexes != null) { - if (typeof object.includeRegexes !== "object") - throw TypeError(".google.privacy.dlp.v2.DatabaseResourceCollection.includeRegexes: object expected"); - message.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.fromObject(object.includeRegexes); - } + var message = new $root.google.privacy.dlp.v2.CloudStorageRegex(); + if (object.projectIdRegex != null) + message.projectIdRegex = String(object.projectIdRegex); + if (object.bucketNameRegex != null) + message.bucketNameRegex = String(object.bucketNameRegex); return message; }; /** - * Creates a plain object from a DatabaseResourceCollection message. Also converts values to other types if specified. + * Creates a plain object from a CloudStorageRegex message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static - * @param {google.privacy.dlp.v2.DatabaseResourceCollection} message DatabaseResourceCollection + * @param {google.privacy.dlp.v2.CloudStorageRegex} message CloudStorageRegex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseResourceCollection.toObject = function toObject(message, options) { + CloudStorageRegex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { - object.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.toObject(message.includeRegexes, options); - if (options.oneofs) - object.pattern = "includeRegexes"; + if (options.defaults) { + object.projectIdRegex = ""; + object.bucketNameRegex = ""; } + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + object.projectIdRegex = message.projectIdRegex; + if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) + object.bucketNameRegex = message.bucketNameRegex; return object; }; /** - * Converts this DatabaseResourceCollection to JSON. + * Converts this CloudStorageRegex to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @instance * @returns {Object.} JSON object */ - DatabaseResourceCollection.prototype.toJSON = function toJSON() { + CloudStorageRegex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseResourceCollection + * Gets the default type url for CloudStorageRegex * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @memberof google.privacy.dlp.v2.CloudStorageRegex * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseResourceCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudStorageRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceCollection"; + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageRegex"; }; - return DatabaseResourceCollection; + return CloudStorageRegex; })(); - v2.DatabaseResourceRegexes = (function() { + v2.CloudStorageResourceReference = (function() { /** - * Properties of a DatabaseResourceRegexes. + * Properties of a CloudStorageResourceReference. * @memberof google.privacy.dlp.v2 - * @interface IDatabaseResourceRegexes - * @property {Array.|null} [patterns] DatabaseResourceRegexes patterns + * @interface ICloudStorageResourceReference + * @property {string|null} [bucketName] CloudStorageResourceReference bucketName + * @property {string|null} [projectId] CloudStorageResourceReference projectId */ /** - * Constructs a new DatabaseResourceRegexes. + * Constructs a new CloudStorageResourceReference. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DatabaseResourceRegexes. - * @implements IDatabaseResourceRegexes + * @classdesc Represents a CloudStorageResourceReference. + * @implements ICloudStorageResourceReference * @constructor - * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes=} [properties] Properties to set + * @param {google.privacy.dlp.v2.ICloudStorageResourceReference=} [properties] Properties to set */ - function DatabaseResourceRegexes(properties) { - this.patterns = []; + function CloudStorageResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -57958,78 +62082,89 @@ } /** - * DatabaseResourceRegexes patterns. - * @member {Array.} patterns - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * CloudStorageResourceReference bucketName. + * @member {string} bucketName + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @instance */ - DatabaseResourceRegexes.prototype.patterns = $util.emptyArray; + CloudStorageResourceReference.prototype.bucketName = ""; /** - * Creates a new DatabaseResourceRegexes instance using the specified properties. + * CloudStorageResourceReference projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @instance + */ + CloudStorageResourceReference.prototype.projectId = ""; + + /** + * Creates a new CloudStorageResourceReference instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes instance + * @param {google.privacy.dlp.v2.ICloudStorageResourceReference=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference instance */ - DatabaseResourceRegexes.create = function create(properties) { - return new DatabaseResourceRegexes(properties); + CloudStorageResourceReference.create = function create(properties) { + return new CloudStorageResourceReference(properties); }; /** - * Encodes the specified DatabaseResourceRegexes message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegexes.verify|verify} messages. + * Encodes the specified CloudStorageResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageResourceReference.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes} message DatabaseResourceRegexes message or plain object to encode + * @param {google.privacy.dlp.v2.ICloudStorageResourceReference} message CloudStorageResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseResourceRegexes.encode = function encode(message, writer) { + CloudStorageResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.patterns != null && message.patterns.length) - for (var i = 0; i < message.patterns.length; ++i) - $root.google.privacy.dlp.v2.DatabaseResourceRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketName); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); return writer; }; /** - * Encodes the specified DatabaseResourceRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegexes.verify|verify} messages. + * Encodes the specified CloudStorageResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes} message DatabaseResourceRegexes message or plain object to encode + * @param {google.privacy.dlp.v2.ICloudStorageResourceReference} message CloudStorageResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseResourceRegexes.encodeDelimited = function encodeDelimited(message, writer) { + CloudStorageResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseResourceRegexes message from the specified reader or buffer. + * Decodes a CloudStorageResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseResourceRegexes.decode = function decode(reader, length) { + CloudStorageResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceRegexes(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.patterns && message.patterns.length)) - message.patterns = []; - message.patterns.push($root.google.privacy.dlp.v2.DatabaseResourceRegex.decode(reader, reader.uint32())); + message.bucketName = reader.string(); + break; + } + case 2: { + message.projectId = reader.string(); break; } default: @@ -58041,142 +62176,132 @@ }; /** - * Decodes a DatabaseResourceRegexes message from the specified reader or buffer, length delimited. + * Decodes a CloudStorageResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseResourceRegexes.decodeDelimited = function decodeDelimited(reader) { + CloudStorageResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseResourceRegexes message. + * Verifies a CloudStorageResourceReference message. * @function verify - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseResourceRegexes.verify = function verify(message) { + CloudStorageResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.patterns != null && message.hasOwnProperty("patterns")) { - if (!Array.isArray(message.patterns)) - return "patterns: array expected"; - for (var i = 0; i < message.patterns.length; ++i) { - var error = $root.google.privacy.dlp.v2.DatabaseResourceRegex.verify(message.patterns[i]); - if (error) - return "patterns." + error; - } - } + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + if (!$util.isString(message.bucketName)) + return "bucketName: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; return null; }; /** - * Creates a DatabaseResourceRegexes message from a plain object. Also converts values to their respective internal types. + * Creates a CloudStorageResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference */ - DatabaseResourceRegexes.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceRegexes) + CloudStorageResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageResourceReference) return object; - var message = new $root.google.privacy.dlp.v2.DatabaseResourceRegexes(); - if (object.patterns) { - if (!Array.isArray(object.patterns)) - throw TypeError(".google.privacy.dlp.v2.DatabaseResourceRegexes.patterns: array expected"); - message.patterns = []; - for (var i = 0; i < object.patterns.length; ++i) { - if (typeof object.patterns[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.DatabaseResourceRegexes.patterns: object expected"); - message.patterns[i] = $root.google.privacy.dlp.v2.DatabaseResourceRegex.fromObject(object.patterns[i]); - } - } + var message = new $root.google.privacy.dlp.v2.CloudStorageResourceReference(); + if (object.bucketName != null) + message.bucketName = String(object.bucketName); + if (object.projectId != null) + message.projectId = String(object.projectId); return message; }; /** - * Creates a plain object from a DatabaseResourceRegexes message. Also converts values to other types if specified. + * Creates a plain object from a CloudStorageResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static - * @param {google.privacy.dlp.v2.DatabaseResourceRegexes} message DatabaseResourceRegexes + * @param {google.privacy.dlp.v2.CloudStorageResourceReference} message CloudStorageResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseResourceRegexes.toObject = function toObject(message, options) { + CloudStorageResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.patterns = []; - if (message.patterns && message.patterns.length) { - object.patterns = []; - for (var j = 0; j < message.patterns.length; ++j) - object.patterns[j] = $root.google.privacy.dlp.v2.DatabaseResourceRegex.toObject(message.patterns[j], options); + if (options.defaults) { + object.bucketName = ""; + object.projectId = ""; } + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + object.bucketName = message.bucketName; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; return object; }; /** - * Converts this DatabaseResourceRegexes to JSON. + * Converts this CloudStorageResourceReference to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @instance * @returns {Object.} JSON object */ - DatabaseResourceRegexes.prototype.toJSON = function toJSON() { + CloudStorageResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseResourceRegexes + * Gets the default type url for CloudStorageResourceReference * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseResourceRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CloudStorageResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceRegexes"; + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageResourceReference"; }; - return DatabaseResourceRegexes; + return CloudStorageResourceReference; })(); - v2.DatabaseResourceRegex = (function() { + v2.DiscoveryCloudStorageGenerationCadence = (function() { /** - * Properties of a DatabaseResourceRegex. + * Properties of a DiscoveryCloudStorageGenerationCadence. * @memberof google.privacy.dlp.v2 - * @interface IDatabaseResourceRegex - * @property {string|null} [projectIdRegex] DatabaseResourceRegex projectIdRegex - * @property {string|null} [instanceRegex] DatabaseResourceRegex instanceRegex - * @property {string|null} [databaseRegex] DatabaseResourceRegex databaseRegex - * @property {string|null} [databaseResourceNameRegex] DatabaseResourceRegex databaseResourceNameRegex + * @interface IDiscoveryCloudStorageGenerationCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryCloudStorageGenerationCadence refreshFrequency + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryCloudStorageGenerationCadence inspectTemplateModifiedCadence */ /** - * Constructs a new DatabaseResourceRegex. + * Constructs a new DiscoveryCloudStorageGenerationCadence. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DatabaseResourceRegex. - * @implements IDatabaseResourceRegex + * @classdesc Represents a DiscoveryCloudStorageGenerationCadence. + * @implements IDiscoveryCloudStorageGenerationCadence * @constructor - * @param {google.privacy.dlp.v2.IDatabaseResourceRegex=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence=} [properties] Properties to set */ - function DatabaseResourceRegex(properties) { + function DiscoveryCloudStorageGenerationCadence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58184,117 +62309,89 @@ } /** - * DatabaseResourceRegex projectIdRegex. - * @member {string} projectIdRegex - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex - * @instance - */ - DatabaseResourceRegex.prototype.projectIdRegex = ""; - - /** - * DatabaseResourceRegex instanceRegex. - * @member {string} instanceRegex - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex - * @instance - */ - DatabaseResourceRegex.prototype.instanceRegex = ""; - - /** - * DatabaseResourceRegex databaseRegex. - * @member {string} databaseRegex - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * DiscoveryCloudStorageGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @instance */ - DatabaseResourceRegex.prototype.databaseRegex = ""; + DiscoveryCloudStorageGenerationCadence.prototype.refreshFrequency = 0; /** - * DatabaseResourceRegex databaseResourceNameRegex. - * @member {string} databaseResourceNameRegex - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * DiscoveryCloudStorageGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @instance */ - DatabaseResourceRegex.prototype.databaseResourceNameRegex = ""; + DiscoveryCloudStorageGenerationCadence.prototype.inspectTemplateModifiedCadence = null; /** - * Creates a new DatabaseResourceRegex instance using the specified properties. + * Creates a new DiscoveryCloudStorageGenerationCadence instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceRegex=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex instance + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence instance */ - DatabaseResourceRegex.create = function create(properties) { - return new DatabaseResourceRegex(properties); + DiscoveryCloudStorageGenerationCadence.create = function create(properties) { + return new DiscoveryCloudStorageGenerationCadence(properties); }; /** - * Encodes the specified DatabaseResourceRegex message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegex.verify|verify} messages. + * Encodes the specified DiscoveryCloudStorageGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceRegex} message DatabaseResourceRegex message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseResourceRegex.encode = function encode(message, writer) { + DiscoveryCloudStorageGenerationCadence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); - if (message.instanceRegex != null && Object.hasOwnProperty.call(message, "instanceRegex")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceRegex); - if (message.databaseRegex != null && Object.hasOwnProperty.call(message, "databaseRegex")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseRegex); - if (message.databaseResourceNameRegex != null && Object.hasOwnProperty.call(message, "databaseResourceNameRegex")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseResourceNameRegex); + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.refreshFrequency); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DatabaseResourceRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegex.verify|verify} messages. + * Encodes the specified DiscoveryCloudStorageGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceRegex} message DatabaseResourceRegex message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseResourceRegex.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryCloudStorageGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseResourceRegex message from the specified reader or buffer. + * Decodes a DiscoveryCloudStorageGenerationCadence message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseResourceRegex.decode = function decode(reader, length) { + DiscoveryCloudStorageGenerationCadence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceRegex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.projectIdRegex = reader.string(); + message.refreshFrequency = reader.int32(); break; } case 2: { - message.instanceRegex = reader.string(); - break; - } - case 3: { - message.databaseRegex = reader.string(); - break; - } - case 4: { - message.databaseResourceNameRegex = reader.string(); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32()); break; } default: @@ -58306,146 +62403,168 @@ }; /** - * Decodes a DatabaseResourceRegex message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryCloudStorageGenerationCadence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseResourceRegex.decodeDelimited = function decodeDelimited(reader) { + DiscoveryCloudStorageGenerationCadence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseResourceRegex message. + * Verifies a DiscoveryCloudStorageGenerationCadence message. * @function verify - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseResourceRegex.verify = function verify(message) { + DiscoveryCloudStorageGenerationCadence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) - if (!$util.isString(message.projectIdRegex)) - return "projectIdRegex: string expected"; - if (message.instanceRegex != null && message.hasOwnProperty("instanceRegex")) - if (!$util.isString(message.instanceRegex)) - return "instanceRegex: string expected"; - if (message.databaseRegex != null && message.hasOwnProperty("databaseRegex")) - if (!$util.isString(message.databaseRegex)) - return "databaseRegex: string expected"; - if (message.databaseResourceNameRegex != null && message.hasOwnProperty("databaseResourceNameRegex")) - if (!$util.isString(message.databaseResourceNameRegex)) - return "databaseResourceNameRegex: string expected"; + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { + default: + return "refreshFrequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence); + if (error) + return "inspectTemplateModifiedCadence." + error; + } return null; }; /** - * Creates a DatabaseResourceRegex message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryCloudStorageGenerationCadence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence */ - DatabaseResourceRegex.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceRegex) + DiscoveryCloudStorageGenerationCadence.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence) return object; - var message = new $root.google.privacy.dlp.v2.DatabaseResourceRegex(); - if (object.projectIdRegex != null) - message.projectIdRegex = String(object.projectIdRegex); - if (object.instanceRegex != null) - message.instanceRegex = String(object.instanceRegex); - if (object.databaseRegex != null) - message.databaseRegex = String(object.databaseRegex); - if (object.databaseResourceNameRegex != null) - message.databaseResourceNameRegex = String(object.databaseResourceNameRegex); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence(); + switch (object.refreshFrequency) { + default: + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.refreshFrequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.refreshFrequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; + break; + } + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence); + } return message; }; /** - * Creates a plain object from a DatabaseResourceRegex message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryCloudStorageGenerationCadence message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static - * @param {google.privacy.dlp.v2.DatabaseResourceRegex} message DatabaseResourceRegex + * @param {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseResourceRegex.toObject = function toObject(message, options) { + DiscoveryCloudStorageGenerationCadence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectIdRegex = ""; - object.instanceRegex = ""; - object.databaseRegex = ""; - object.databaseResourceNameRegex = ""; + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + object.inspectTemplateModifiedCadence = null; } - if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) - object.projectIdRegex = message.projectIdRegex; - if (message.instanceRegex != null && message.hasOwnProperty("instanceRegex")) - object.instanceRegex = message.instanceRegex; - if (message.databaseRegex != null && message.hasOwnProperty("databaseRegex")) - object.databaseRegex = message.databaseRegex; - if (message.databaseResourceNameRegex != null && message.hasOwnProperty("databaseResourceNameRegex")) - object.databaseResourceNameRegex = message.databaseResourceNameRegex; + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); return object; }; /** - * Converts this DatabaseResourceRegex to JSON. + * Converts this DiscoveryCloudStorageGenerationCadence to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @instance * @returns {Object.} JSON object */ - DatabaseResourceRegex.prototype.toJSON = function toJSON() { + DiscoveryCloudStorageGenerationCadence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseResourceRegex + * Gets the default type url for DiscoveryCloudStorageGenerationCadence * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseResourceRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryCloudStorageGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceRegex"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence"; }; - return DatabaseResourceRegex; + return DiscoveryCloudStorageGenerationCadence; })(); - v2.AllOtherDatabaseResources = (function() { + v2.DiscoveryCloudStorageConditions = (function() { /** - * Properties of an AllOtherDatabaseResources. + * Properties of a DiscoveryCloudStorageConditions. * @memberof google.privacy.dlp.v2 - * @interface IAllOtherDatabaseResources + * @interface IDiscoveryCloudStorageConditions + * @property {Array.|null} [includedObjectAttributes] DiscoveryCloudStorageConditions includedObjectAttributes + * @property {Array.|null} [includedBucketAttributes] DiscoveryCloudStorageConditions includedBucketAttributes */ /** - * Constructs a new AllOtherDatabaseResources. + * Constructs a new DiscoveryCloudStorageConditions. * @memberof google.privacy.dlp.v2 - * @classdesc Represents an AllOtherDatabaseResources. - * @implements IAllOtherDatabaseResources + * @classdesc Represents a DiscoveryCloudStorageConditions. + * @implements IDiscoveryCloudStorageConditions * @constructor - * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions=} [properties] Properties to set */ - function AllOtherDatabaseResources(properties) { + function DiscoveryCloudStorageConditions(properties) { + this.includedObjectAttributes = []; + this.includedBucketAttributes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58453,63 +62572,113 @@ } /** - * Creates a new AllOtherDatabaseResources instance using the specified properties. + * DiscoveryCloudStorageConditions includedObjectAttributes. + * @member {Array.} includedObjectAttributes + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @instance + */ + DiscoveryCloudStorageConditions.prototype.includedObjectAttributes = $util.emptyArray; + + /** + * DiscoveryCloudStorageConditions includedBucketAttributes. + * @member {Array.} includedBucketAttributes + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @instance + */ + DiscoveryCloudStorageConditions.prototype.includedBucketAttributes = $util.emptyArray; + + /** + * Creates a new DiscoveryCloudStorageConditions instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static - * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources instance + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions instance */ - AllOtherDatabaseResources.create = function create(properties) { - return new AllOtherDatabaseResources(properties); + DiscoveryCloudStorageConditions.create = function create(properties) { + return new DiscoveryCloudStorageConditions(properties); }; /** - * Encodes the specified AllOtherDatabaseResources message. Does not implicitly {@link google.privacy.dlp.v2.AllOtherDatabaseResources.verify|verify} messages. + * Encodes the specified DiscoveryCloudStorageConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static - * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources} message AllOtherDatabaseResources message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AllOtherDatabaseResources.encode = function encode(message, writer) { + DiscoveryCloudStorageConditions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.includedObjectAttributes != null && message.includedObjectAttributes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.includedObjectAttributes.length; ++i) + writer.int32(message.includedObjectAttributes[i]); + writer.ldelim(); + } + if (message.includedBucketAttributes != null && message.includedBucketAttributes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.includedBucketAttributes.length; ++i) + writer.int32(message.includedBucketAttributes[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified AllOtherDatabaseResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AllOtherDatabaseResources.verify|verify} messages. + * Encodes the specified DiscoveryCloudStorageConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static - * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources} message AllOtherDatabaseResources message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AllOtherDatabaseResources.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryCloudStorageConditions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AllOtherDatabaseResources message from the specified reader or buffer. + * Decodes a DiscoveryCloudStorageConditions message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AllOtherDatabaseResources.decode = function decode(reader, length) { + DiscoveryCloudStorageConditions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AllOtherDatabaseResources(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.includedObjectAttributes && message.includedObjectAttributes.length)) + message.includedObjectAttributes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.includedObjectAttributes.push(reader.int32()); + } else + message.includedObjectAttributes.push(reader.int32()); + break; + } + case 2: { + if (!(message.includedBucketAttributes && message.includedBucketAttributes.length)) + message.includedBucketAttributes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.includedBucketAttributes.push(reader.int32()); + } else + message.includedBucketAttributes.push(reader.int32()); + break; + } default: reader.skipType(tag & 7); break; @@ -58519,112 +62688,286 @@ }; /** - * Decodes an AllOtherDatabaseResources message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryCloudStorageConditions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AllOtherDatabaseResources.decodeDelimited = function decodeDelimited(reader) { + DiscoveryCloudStorageConditions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AllOtherDatabaseResources message. + * Verifies a DiscoveryCloudStorageConditions message. * @function verify - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AllOtherDatabaseResources.verify = function verify(message) { + DiscoveryCloudStorageConditions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.includedObjectAttributes != null && message.hasOwnProperty("includedObjectAttributes")) { + if (!Array.isArray(message.includedObjectAttributes)) + return "includedObjectAttributes: array expected"; + for (var i = 0; i < message.includedObjectAttributes.length; ++i) + switch (message.includedObjectAttributes[i]) { + default: + return "includedObjectAttributes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message.includedBucketAttributes != null && message.hasOwnProperty("includedBucketAttributes")) { + if (!Array.isArray(message.includedBucketAttributes)) + return "includedBucketAttributes: array expected"; + for (var i = 0; i < message.includedBucketAttributes.length; ++i) + switch (message.includedBucketAttributes[i]) { + default: + return "includedBucketAttributes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } return null; }; /** - * Creates an AllOtherDatabaseResources message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryCloudStorageConditions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions */ - AllOtherDatabaseResources.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.AllOtherDatabaseResources) + DiscoveryCloudStorageConditions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions) return object; - return new $root.google.privacy.dlp.v2.AllOtherDatabaseResources(); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions(); + if (object.includedObjectAttributes) { + if (!Array.isArray(object.includedObjectAttributes)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageConditions.includedObjectAttributes: array expected"); + message.includedObjectAttributes = []; + for (var i = 0; i < object.includedObjectAttributes.length; ++i) + switch (object.includedObjectAttributes[i]) { + default: + if (typeof object.includedObjectAttributes[i] === "number") { + message.includedObjectAttributes[i] = object.includedObjectAttributes[i]; + break; + } + case "CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED": + case 0: + message.includedObjectAttributes[i] = 0; + break; + case "ALL_SUPPORTED_OBJECTS": + case 1: + message.includedObjectAttributes[i] = 1; + break; + case "STANDARD": + case 2: + message.includedObjectAttributes[i] = 2; + break; + case "NEARLINE": + case 3: + message.includedObjectAttributes[i] = 3; + break; + case "COLDLINE": + case 4: + message.includedObjectAttributes[i] = 4; + break; + case "ARCHIVE": + case 5: + message.includedObjectAttributes[i] = 5; + break; + case "REGIONAL": + case 6: + message.includedObjectAttributes[i] = 6; + break; + case "MULTI_REGIONAL": + case 7: + message.includedObjectAttributes[i] = 7; + break; + case "DURABLE_REDUCED_AVAILABILITY": + case 8: + message.includedObjectAttributes[i] = 8; + break; + } + } + if (object.includedBucketAttributes) { + if (!Array.isArray(object.includedBucketAttributes)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageConditions.includedBucketAttributes: array expected"); + message.includedBucketAttributes = []; + for (var i = 0; i < object.includedBucketAttributes.length; ++i) + switch (object.includedBucketAttributes[i]) { + default: + if (typeof object.includedBucketAttributes[i] === "number") { + message.includedBucketAttributes[i] = object.includedBucketAttributes[i]; + break; + } + case "CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED": + case 0: + message.includedBucketAttributes[i] = 0; + break; + case "ALL_SUPPORTED_BUCKETS": + case 1: + message.includedBucketAttributes[i] = 1; + break; + case "AUTOCLASS_DISABLED": + case 2: + message.includedBucketAttributes[i] = 2; + break; + case "AUTOCLASS_ENABLED": + case 3: + message.includedBucketAttributes[i] = 3; + break; + } + } + return message; }; /** - * Creates a plain object from an AllOtherDatabaseResources message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryCloudStorageConditions message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static - * @param {google.privacy.dlp.v2.AllOtherDatabaseResources} message AllOtherDatabaseResources + * @param {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AllOtherDatabaseResources.toObject = function toObject() { - return {}; + DiscoveryCloudStorageConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedObjectAttributes = []; + object.includedBucketAttributes = []; + } + if (message.includedObjectAttributes && message.includedObjectAttributes.length) { + object.includedObjectAttributes = []; + for (var j = 0; j < message.includedObjectAttributes.length; ++j) + object.includedObjectAttributes[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute[message.includedObjectAttributes[j]] === undefined ? message.includedObjectAttributes[j] : $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute[message.includedObjectAttributes[j]] : message.includedObjectAttributes[j]; + } + if (message.includedBucketAttributes && message.includedBucketAttributes.length) { + object.includedBucketAttributes = []; + for (var j = 0; j < message.includedBucketAttributes.length; ++j) + object.includedBucketAttributes[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute[message.includedBucketAttributes[j]] === undefined ? message.includedBucketAttributes[j] : $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute[message.includedBucketAttributes[j]] : message.includedBucketAttributes[j]; + } + return object; }; /** - * Converts this AllOtherDatabaseResources to JSON. + * Converts this DiscoveryCloudStorageConditions to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @instance * @returns {Object.} JSON object */ - AllOtherDatabaseResources.prototype.toJSON = function toJSON() { + DiscoveryCloudStorageConditions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AllOtherDatabaseResources + * Gets the default type url for DiscoveryCloudStorageConditions * @function getTypeUrl - * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AllOtherDatabaseResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryCloudStorageConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.AllOtherDatabaseResources"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageConditions"; }; - return AllOtherDatabaseResources; + /** + * CloudStorageObjectAttribute enum. + * @name google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute + * @enum {number} + * @property {number} CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED=0 CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED value + * @property {number} ALL_SUPPORTED_OBJECTS=1 ALL_SUPPORTED_OBJECTS value + * @property {number} STANDARD=2 STANDARD value + * @property {number} NEARLINE=3 NEARLINE value + * @property {number} COLDLINE=4 COLDLINE value + * @property {number} ARCHIVE=5 ARCHIVE value + * @property {number} REGIONAL=6 REGIONAL value + * @property {number} MULTI_REGIONAL=7 MULTI_REGIONAL value + * @property {number} DURABLE_REDUCED_AVAILABILITY=8 DURABLE_REDUCED_AVAILABILITY value + */ + DiscoveryCloudStorageConditions.CloudStorageObjectAttribute = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SUPPORTED_OBJECTS"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + values[valuesById[3] = "NEARLINE"] = 3; + values[valuesById[4] = "COLDLINE"] = 4; + values[valuesById[5] = "ARCHIVE"] = 5; + values[valuesById[6] = "REGIONAL"] = 6; + values[valuesById[7] = "MULTI_REGIONAL"] = 7; + values[valuesById[8] = "DURABLE_REDUCED_AVAILABILITY"] = 8; + return values; + })(); + + /** + * CloudStorageBucketAttribute enum. + * @name google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute + * @enum {number} + * @property {number} CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED=0 CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED value + * @property {number} ALL_SUPPORTED_BUCKETS=1 ALL_SUPPORTED_BUCKETS value + * @property {number} AUTOCLASS_DISABLED=2 AUTOCLASS_DISABLED value + * @property {number} AUTOCLASS_ENABLED=3 AUTOCLASS_ENABLED value + */ + DiscoveryCloudStorageConditions.CloudStorageBucketAttribute = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SUPPORTED_BUCKETS"] = 1; + values[valuesById[2] = "AUTOCLASS_DISABLED"] = 2; + values[valuesById[3] = "AUTOCLASS_ENABLED"] = 3; + return values; + })(); + + return DiscoveryCloudStorageConditions; })(); - v2.DatabaseResourceReference = (function() { + v2.DiscoveryFileStoreConditions = (function() { /** - * Properties of a DatabaseResourceReference. + * Properties of a DiscoveryFileStoreConditions. * @memberof google.privacy.dlp.v2 - * @interface IDatabaseResourceReference - * @property {string|null} [projectId] DatabaseResourceReference projectId - * @property {string|null} [instance] DatabaseResourceReference instance - * @property {string|null} [database] DatabaseResourceReference database - * @property {string|null} [databaseResource] DatabaseResourceReference databaseResource + * @interface IDiscoveryFileStoreConditions + * @property {google.protobuf.ITimestamp|null} [createdAfter] DiscoveryFileStoreConditions createdAfter + * @property {google.protobuf.IDuration|null} [minAge] DiscoveryFileStoreConditions minAge + * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions|null} [cloudStorageConditions] DiscoveryFileStoreConditions cloudStorageConditions */ /** - * Constructs a new DatabaseResourceReference. + * Constructs a new DiscoveryFileStoreConditions. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DatabaseResourceReference. - * @implements IDatabaseResourceReference + * @classdesc Represents a DiscoveryFileStoreConditions. + * @implements IDiscoveryFileStoreConditions * @constructor - * @param {google.privacy.dlp.v2.IDatabaseResourceReference=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions=} [properties] Properties to set */ - function DatabaseResourceReference(properties) { + function DiscoveryFileStoreConditions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58632,117 +62975,117 @@ } /** - * DatabaseResourceReference projectId. - * @member {string} projectId - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * DiscoveryFileStoreConditions createdAfter. + * @member {google.protobuf.ITimestamp|null|undefined} createdAfter + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @instance */ - DatabaseResourceReference.prototype.projectId = ""; + DiscoveryFileStoreConditions.prototype.createdAfter = null; /** - * DatabaseResourceReference instance. - * @member {string} instance - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * DiscoveryFileStoreConditions minAge. + * @member {google.protobuf.IDuration|null|undefined} minAge + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @instance */ - DatabaseResourceReference.prototype.instance = ""; + DiscoveryFileStoreConditions.prototype.minAge = null; /** - * DatabaseResourceReference database. - * @member {string} database - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * DiscoveryFileStoreConditions cloudStorageConditions. + * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions|null|undefined} cloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @instance */ - DatabaseResourceReference.prototype.database = ""; + DiscoveryFileStoreConditions.prototype.cloudStorageConditions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * DatabaseResourceReference databaseResource. - * @member {string} databaseResource - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * DiscoveryFileStoreConditions conditions. + * @member {"cloudStorageConditions"|undefined} conditions + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @instance */ - DatabaseResourceReference.prototype.databaseResource = ""; + Object.defineProperty(DiscoveryFileStoreConditions.prototype, "conditions", { + get: $util.oneOfGetter($oneOfFields = ["cloudStorageConditions"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new DatabaseResourceReference instance using the specified properties. + * Creates a new DiscoveryFileStoreConditions instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceReference=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference instance + * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions instance */ - DatabaseResourceReference.create = function create(properties) { - return new DatabaseResourceReference(properties); + DiscoveryFileStoreConditions.create = function create(properties) { + return new DiscoveryFileStoreConditions(properties); }; /** - * Encodes the specified DatabaseResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceReference.verify|verify} messages. + * Encodes the specified DiscoveryFileStoreConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceReference} message DatabaseResourceReference message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions} message DiscoveryFileStoreConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseResourceReference.encode = function encode(message, writer) { + DiscoveryFileStoreConditions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.instance); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.database); - if (message.databaseResource != null && Object.hasOwnProperty.call(message, "databaseResource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseResource); + if (message.createdAfter != null && Object.hasOwnProperty.call(message, "createdAfter")) + $root.google.protobuf.Timestamp.encode(message.createdAfter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) + $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cloudStorageConditions != null && Object.hasOwnProperty.call(message, "cloudStorageConditions")) + $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.encode(message.cloudStorageConditions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified DatabaseResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceReference.verify|verify} messages. + * Encodes the specified DiscoveryFileStoreConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static - * @param {google.privacy.dlp.v2.IDatabaseResourceReference} message DatabaseResourceReference message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions} message DiscoveryFileStoreConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DatabaseResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryFileStoreConditions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DatabaseResourceReference message from the specified reader or buffer. + * Decodes a DiscoveryFileStoreConditions message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference + * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseResourceReference.decode = function decode(reader, length) { + DiscoveryFileStoreConditions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.projectId = reader.string(); + message.createdAfter = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.instance = reader.string(); + message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 3: { - message.database = reader.string(); - break; - } - case 4: { - message.databaseResource = reader.string(); + message.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.decode(reader, reader.uint32()); break; } default: @@ -58754,150 +63097,164 @@ }; /** - * Decodes a DatabaseResourceReference message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryFileStoreConditions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference + * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DatabaseResourceReference.decodeDelimited = function decodeDelimited(reader) { + DiscoveryFileStoreConditions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DatabaseResourceReference message. + * Verifies a DiscoveryFileStoreConditions message. * @function verify - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DatabaseResourceReference.verify = function verify(message) { + DiscoveryFileStoreConditions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.instance != null && message.hasOwnProperty("instance")) - if (!$util.isString(message.instance)) - return "instance: string expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.databaseResource != null && message.hasOwnProperty("databaseResource")) - if (!$util.isString(message.databaseResource)) - return "databaseResource: string expected"; + var properties = {}; + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) { + var error = $root.google.protobuf.Timestamp.verify(message.createdAfter); + if (error) + return "createdAfter." + error; + } + if (message.minAge != null && message.hasOwnProperty("minAge")) { + var error = $root.google.protobuf.Duration.verify(message.minAge); + if (error) + return "minAge." + error; + } + if (message.cloudStorageConditions != null && message.hasOwnProperty("cloudStorageConditions")) { + properties.conditions = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify(message.cloudStorageConditions); + if (error) + return "cloudStorageConditions." + error; + } + } return null; }; /** - * Creates a DatabaseResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryFileStoreConditions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference + * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions */ - DatabaseResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceReference) + DiscoveryFileStoreConditions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions) return object; - var message = new $root.google.privacy.dlp.v2.DatabaseResourceReference(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.instance != null) - message.instance = String(object.instance); - if (object.database != null) - message.database = String(object.database); - if (object.databaseResource != null) - message.databaseResource = String(object.databaseResource); + var message = new $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions(); + if (object.createdAfter != null) { + if (typeof object.createdAfter !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.createdAfter: object expected"); + message.createdAfter = $root.google.protobuf.Timestamp.fromObject(object.createdAfter); + } + if (object.minAge != null) { + if (typeof object.minAge !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.minAge: object expected"); + message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge); + } + if (object.cloudStorageConditions != null) { + if (typeof object.cloudStorageConditions !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.cloudStorageConditions: object expected"); + message.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.fromObject(object.cloudStorageConditions); + } return message; }; /** - * Creates a plain object from a DatabaseResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryFileStoreConditions message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static - * @param {google.privacy.dlp.v2.DatabaseResourceReference} message DatabaseResourceReference + * @param {google.privacy.dlp.v2.DiscoveryFileStoreConditions} message DiscoveryFileStoreConditions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DatabaseResourceReference.toObject = function toObject(message, options) { + DiscoveryFileStoreConditions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectId = ""; - object.instance = ""; - object.database = ""; - object.databaseResource = ""; + object.createdAfter = null; + object.minAge = null; + } + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) + object.createdAfter = $root.google.protobuf.Timestamp.toObject(message.createdAfter, options); + if (message.minAge != null && message.hasOwnProperty("minAge")) + object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); + if (message.cloudStorageConditions != null && message.hasOwnProperty("cloudStorageConditions")) { + object.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.toObject(message.cloudStorageConditions, options); + if (options.oneofs) + object.conditions = "cloudStorageConditions"; } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.instance != null && message.hasOwnProperty("instance")) - object.instance = message.instance; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.databaseResource != null && message.hasOwnProperty("databaseResource")) - object.databaseResource = message.databaseResource; return object; }; /** - * Converts this DatabaseResourceReference to JSON. + * Converts this DiscoveryFileStoreConditions to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @instance * @returns {Object.} JSON object */ - DatabaseResourceReference.prototype.toJSON = function toJSON() { + DiscoveryFileStoreConditions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DatabaseResourceReference + * Gets the default type url for DiscoveryFileStoreConditions * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DatabaseResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryFileStoreConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceReference"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryFileStoreConditions"; }; - return DatabaseResourceReference; + return DiscoveryFileStoreConditions; })(); - v2.DiscoveryCloudSqlConditions = (function() { + v2.OtherCloudDiscoveryTarget = (function() { /** - * Properties of a DiscoveryCloudSqlConditions. + * Properties of an OtherCloudDiscoveryTarget. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryCloudSqlConditions - * @property {Array.|null} [databaseEngines] DiscoveryCloudSqlConditions databaseEngines - * @property {Array.|null} [types] DiscoveryCloudSqlConditions types + * @interface IOtherCloudDiscoveryTarget + * @property {google.privacy.dlp.v2.IDataSourceType|null} [dataSourceType] OtherCloudDiscoveryTarget dataSourceType + * @property {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter|null} [filter] OtherCloudDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions|null} [conditions] OtherCloudDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence|null} [generationCadence] OtherCloudDiscoveryTarget generationCadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] OtherCloudDiscoveryTarget disabled */ /** - * Constructs a new DiscoveryCloudSqlConditions. + * Constructs a new OtherCloudDiscoveryTarget. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryCloudSqlConditions. - * @implements IDiscoveryCloudSqlConditions + * @classdesc Represents an OtherCloudDiscoveryTarget. + * @implements IOtherCloudDiscoveryTarget * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget=} [properties] Properties to set */ - function DiscoveryCloudSqlConditions(properties) { - this.databaseEngines = []; - this.types = []; + function OtherCloudDiscoveryTarget(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -58905,111 +63262,145 @@ } /** - * DiscoveryCloudSqlConditions databaseEngines. - * @member {Array.} databaseEngines - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * OtherCloudDiscoveryTarget dataSourceType. + * @member {google.privacy.dlp.v2.IDataSourceType|null|undefined} dataSourceType + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @instance */ - DiscoveryCloudSqlConditions.prototype.databaseEngines = $util.emptyArray; + OtherCloudDiscoveryTarget.prototype.dataSourceType = null; /** - * DiscoveryCloudSqlConditions types. - * @member {Array.} types - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * OtherCloudDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @instance */ - DiscoveryCloudSqlConditions.prototype.types = $util.emptyArray; + OtherCloudDiscoveryTarget.prototype.filter = null; /** - * Creates a new DiscoveryCloudSqlConditions instance using the specified properties. + * OtherCloudDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + OtherCloudDiscoveryTarget.prototype.conditions = null; + + /** + * OtherCloudDiscoveryTarget generationCadence. + * @member {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence|null|undefined} generationCadence + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + OtherCloudDiscoveryTarget.prototype.generationCadence = null; + + /** + * OtherCloudDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + OtherCloudDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OtherCloudDiscoveryTarget cadence. + * @member {"generationCadence"|"disabled"|undefined} cadence + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + Object.defineProperty(OtherCloudDiscoveryTarget.prototype, "cadence", { + get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OtherCloudDiscoveryTarget instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions instance + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} OtherCloudDiscoveryTarget instance */ - DiscoveryCloudSqlConditions.create = function create(properties) { - return new DiscoveryCloudSqlConditions(properties); + OtherCloudDiscoveryTarget.create = function create(properties) { + return new OtherCloudDiscoveryTarget(properties); }; /** - * Encodes the specified DiscoveryCloudSqlConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify|verify} messages. + * Encodes the specified OtherCloudDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget} message OtherCloudDiscoveryTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudSqlConditions.encode = function encode(message, writer) { + OtherCloudDiscoveryTarget.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.databaseEngines != null && message.databaseEngines.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.databaseEngines.length; ++i) - writer.int32(message.databaseEngines[i]); - writer.ldelim(); - } - if (message.types != null && message.types.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.types.length; ++i) - writer.int32(message.types[i]); - writer.ldelim(); - } + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + $root.google.privacy.dlp.v2.DataSourceType.encode(message.dataSourceType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.encode(message.filter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.encode(message.conditions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) + $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryCloudSqlConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify|verify} messages. + * Encodes the specified OtherCloudDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget} message OtherCloudDiscoveryTarget message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudSqlConditions.encodeDelimited = function encodeDelimited(message, writer) { + OtherCloudDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryCloudSqlConditions message from the specified reader or buffer. + * Decodes an OtherCloudDiscoveryTarget message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} OtherCloudDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudSqlConditions.decode = function decode(reader, length) { + OtherCloudDiscoveryTarget.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.databaseEngines && message.databaseEngines.length)) - message.databaseEngines = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.databaseEngines.push(reader.int32()); - } else - message.databaseEngines.push(reader.int32()); + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.decode(reader, reader.uint32()); + break; + } + case 2: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.types && message.types.length)) - message.types = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.types.push(reader.int32()); - } else - message.types.push(reader.int32()); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.decode(reader, reader.uint32()); + break; + } + case 4: { + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.decode(reader, reader.uint32()); + break; + } + case 5: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32()); break; } default: @@ -59021,244 +63412,195 @@ }; /** - * Decodes a DiscoveryCloudSqlConditions message from the specified reader or buffer, length delimited. + * Decodes an OtherCloudDiscoveryTarget message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} OtherCloudDiscoveryTarget * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudSqlConditions.decodeDelimited = function decodeDelimited(reader) { + OtherCloudDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryCloudSqlConditions message. + * Verifies an OtherCloudDiscoveryTarget message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryCloudSqlConditions.verify = function verify(message) { + OtherCloudDiscoveryTarget.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.databaseEngines != null && message.hasOwnProperty("databaseEngines")) { - if (!Array.isArray(message.databaseEngines)) - return "databaseEngines: array expected"; - for (var i = 0; i < message.databaseEngines.length; ++i) - switch (message.databaseEngines[i]) { - default: - return "databaseEngines: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + var properties = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + var error = $root.google.privacy.dlp.v2.DataSourceType.verify(message.dataSourceType); + if (error) + return "dataSourceType." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify(message.filter); + if (error) + return "filter." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify(message.conditions); + if (error) + return "conditions." + error; } - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - switch (message.types[i]) { - default: - return "types: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify(message.generationCadence); + if (error) + return "generationCadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.cadence === 1) + return "cadence: multiple values"; + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled); + if (error) + return "disabled." + error; + } } return null; }; /** - * Creates a DiscoveryCloudSqlConditions message from a plain object. Also converts values to their respective internal types. + * Creates an OtherCloudDiscoveryTarget message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} OtherCloudDiscoveryTarget */ - DiscoveryCloudSqlConditions.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions) + OtherCloudDiscoveryTarget.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions(); - if (object.databaseEngines) { - if (!Array.isArray(object.databaseEngines)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlConditions.databaseEngines: array expected"); - message.databaseEngines = []; - for (var i = 0; i < object.databaseEngines.length; ++i) - switch (object.databaseEngines[i]) { - default: - if (typeof object.databaseEngines[i] === "number") { - message.databaseEngines[i] = object.databaseEngines[i]; - break; - } - case "DATABASE_ENGINE_UNSPECIFIED": - case 0: - message.databaseEngines[i] = 0; - break; - case "ALL_SUPPORTED_DATABASE_ENGINES": - case 1: - message.databaseEngines[i] = 1; - break; - case "MYSQL": - case 2: - message.databaseEngines[i] = 2; - break; - case "POSTGRES": - case 3: - message.databaseEngines[i] = 3; - break; - } + var message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget(); + if (object.dataSourceType != null) { + if (typeof object.dataSourceType !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.dataSourceType: object expected"); + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.fromObject(object.dataSourceType); } - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlConditions.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - switch (object.types[i]) { - default: - if (typeof object.types[i] === "number") { - message.types[i] = object.types[i]; - break; - } - case "DATABASE_RESOURCE_TYPE_UNSPECIFIED": - case 0: - message.types[i] = 0; - break; - case "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES": - case 1: - message.types[i] = 1; - break; - case "DATABASE_RESOURCE_TYPE_TABLE": - case 2: - message.types[i] = 2; - break; - } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.fromObject(object.filter); + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.fromObject(object.conditions); + } + if (object.generationCadence != null) { + if (typeof object.generationCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.generationCadence: object expected"); + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.fromObject(object.generationCadence); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled); } return message; }; /** - * Creates a plain object from a DiscoveryCloudSqlConditions message. Also converts values to other types if specified. + * Creates a plain object from an OtherCloudDiscoveryTarget message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} message OtherCloudDiscoveryTarget * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryCloudSqlConditions.toObject = function toObject(message, options) { + OtherCloudDiscoveryTarget.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.databaseEngines = []; - object.types = []; + if (options.defaults) { + object.dataSourceType = null; + object.filter = null; + object.conditions = null; } - if (message.databaseEngines && message.databaseEngines.length) { - object.databaseEngines = []; - for (var j = 0; j < message.databaseEngines.length; ++j) - object.databaseEngines[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine[message.databaseEngines[j]] === undefined ? message.databaseEngines[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine[message.databaseEngines[j]] : message.databaseEngines[j]; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) + object.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.toObject(message.dataSourceType, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.toObject(message.filter, options); + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.toObject(message.conditions, options); + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.toObject(message.generationCadence, options); + if (options.oneofs) + object.cadence = "generationCadence"; } - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType[message.types[j]] : message.types[j]; + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.cadence = "disabled"; } return object; }; /** - * Converts this DiscoveryCloudSqlConditions to JSON. + * Converts this OtherCloudDiscoveryTarget to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @instance * @returns {Object.} JSON object */ - DiscoveryCloudSqlConditions.prototype.toJSON = function toJSON() { + OtherCloudDiscoveryTarget.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryCloudSqlConditions + * Gets the default type url for OtherCloudDiscoveryTarget * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryCloudSqlConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OtherCloudDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlConditions"; + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudDiscoveryTarget"; }; - /** - * DatabaseEngine enum. - * @name google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine - * @enum {number} - * @property {number} DATABASE_ENGINE_UNSPECIFIED=0 DATABASE_ENGINE_UNSPECIFIED value - * @property {number} ALL_SUPPORTED_DATABASE_ENGINES=1 ALL_SUPPORTED_DATABASE_ENGINES value - * @property {number} MYSQL=2 MYSQL value - * @property {number} POSTGRES=3 POSTGRES value - */ - DiscoveryCloudSqlConditions.DatabaseEngine = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_ENGINE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALL_SUPPORTED_DATABASE_ENGINES"] = 1; - values[valuesById[2] = "MYSQL"] = 2; - values[valuesById[3] = "POSTGRES"] = 3; - return values; - })(); - - /** - * DatabaseResourceType enum. - * @name google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType - * @enum {number} - * @property {number} DATABASE_RESOURCE_TYPE_UNSPECIFIED=0 DATABASE_RESOURCE_TYPE_UNSPECIFIED value - * @property {number} DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES=1 DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES value - * @property {number} DATABASE_RESOURCE_TYPE_TABLE=2 DATABASE_RESOURCE_TYPE_TABLE value - */ - DiscoveryCloudSqlConditions.DatabaseResourceType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_RESOURCE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES"] = 1; - values[valuesById[2] = "DATABASE_RESOURCE_TYPE_TABLE"] = 2; - return values; - })(); - - return DiscoveryCloudSqlConditions; + return OtherCloudDiscoveryTarget; })(); - v2.DiscoveryCloudSqlGenerationCadence = (function() { + v2.DiscoveryOtherCloudFilter = (function() { /** - * Properties of a DiscoveryCloudSqlGenerationCadence. + * Properties of a DiscoveryOtherCloudFilter. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryCloudSqlGenerationCadence - * @property {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null} [schemaModifiedCadence] DiscoveryCloudSqlGenerationCadence schemaModifiedCadence - * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryCloudSqlGenerationCadence refreshFrequency - * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence + * @interface IDiscoveryOtherCloudFilter + * @property {google.privacy.dlp.v2.IOtherCloudResourceCollection|null} [collection] DiscoveryOtherCloudFilter collection + * @property {google.privacy.dlp.v2.IOtherCloudSingleResourceReference|null} [singleResource] DiscoveryOtherCloudFilter singleResource + * @property {google.privacy.dlp.v2.IAllOtherResources|null} [others] DiscoveryOtherCloudFilter others */ /** - * Constructs a new DiscoveryCloudSqlGenerationCadence. + * Constructs a new DiscoveryOtherCloudFilter. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryCloudSqlGenerationCadence. - * @implements IDiscoveryCloudSqlGenerationCadence + * @classdesc Represents a DiscoveryOtherCloudFilter. + * @implements IDiscoveryOtherCloudFilter * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter=} [properties] Properties to set */ - function DiscoveryCloudSqlGenerationCadence(properties) { + function DiscoveryOtherCloudFilter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59266,103 +63608,117 @@ } /** - * DiscoveryCloudSqlGenerationCadence schemaModifiedCadence. - * @member {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null|undefined} schemaModifiedCadence - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * DiscoveryOtherCloudFilter collection. + * @member {google.privacy.dlp.v2.IOtherCloudResourceCollection|null|undefined} collection + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @instance */ - DiscoveryCloudSqlGenerationCadence.prototype.schemaModifiedCadence = null; + DiscoveryOtherCloudFilter.prototype.collection = null; /** - * DiscoveryCloudSqlGenerationCadence refreshFrequency. - * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * DiscoveryOtherCloudFilter singleResource. + * @member {google.privacy.dlp.v2.IOtherCloudSingleResourceReference|null|undefined} singleResource + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @instance */ - DiscoveryCloudSqlGenerationCadence.prototype.refreshFrequency = 0; + DiscoveryOtherCloudFilter.prototype.singleResource = null; /** - * DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence. - * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * DiscoveryOtherCloudFilter others. + * @member {google.privacy.dlp.v2.IAllOtherResources|null|undefined} others + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @instance */ - DiscoveryCloudSqlGenerationCadence.prototype.inspectTemplateModifiedCadence = null; + DiscoveryOtherCloudFilter.prototype.others = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new DiscoveryCloudSqlGenerationCadence instance using the specified properties. + * DiscoveryOtherCloudFilter filter. + * @member {"collection"|"singleResource"|"others"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @instance + */ + Object.defineProperty(DiscoveryOtherCloudFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["collection", "singleResource", "others"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryOtherCloudFilter instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence instance + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} DiscoveryOtherCloudFilter instance */ - DiscoveryCloudSqlGenerationCadence.create = function create(properties) { - return new DiscoveryCloudSqlGenerationCadence(properties); + DiscoveryOtherCloudFilter.create = function create(properties) { + return new DiscoveryOtherCloudFilter(properties); }; /** - * Encodes the specified DiscoveryCloudSqlGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify|verify} messages. + * Encodes the specified DiscoveryOtherCloudFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter} message DiscoveryOtherCloudFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudSqlGenerationCadence.encode = function encode(message, writer) { + DiscoveryOtherCloudFilter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.schemaModifiedCadence != null && Object.hasOwnProperty.call(message, "schemaModifiedCadence")) - $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.encode(message.schemaModifiedCadence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.refreshFrequency); - if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) - $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) + $root.google.privacy.dlp.v2.OtherCloudResourceCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.singleResource != null && Object.hasOwnProperty.call(message, "singleResource")) + $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.encode(message.singleResource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.others != null && Object.hasOwnProperty.call(message, "others")) + $root.google.privacy.dlp.v2.AllOtherResources.encode(message.others, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryCloudSqlGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify|verify} messages. + * Encodes the specified DiscoveryOtherCloudFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter} message DiscoveryOtherCloudFilter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudSqlGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryOtherCloudFilter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryCloudSqlGenerationCadence message from the specified reader or buffer. + * Decodes a DiscoveryOtherCloudFilter message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} DiscoveryOtherCloudFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudSqlGenerationCadence.decode = function decode(reader, length) { + DiscoveryOtherCloudFilter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.decode(reader, reader.uint32()); + message.collection = $root.google.privacy.dlp.v2.OtherCloudResourceCollection.decode(reader, reader.uint32()); break; } case 2: { - message.refreshFrequency = reader.int32(); + message.singleResource = $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.decode(reader, reader.uint32()); break; } - case 3: { - message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32()); + case 100: { + message.others = $root.google.privacy.dlp.v2.AllOtherResources.decode(reader, reader.uint32()); break; } default: @@ -59374,497 +63730,400 @@ }; /** - * Decodes a DiscoveryCloudSqlGenerationCadence message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryOtherCloudFilter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} DiscoveryOtherCloudFilter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudSqlGenerationCadence.decodeDelimited = function decodeDelimited(reader) { + DiscoveryOtherCloudFilter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryCloudSqlGenerationCadence message. + * Verifies a DiscoveryOtherCloudFilter message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryCloudSqlGenerationCadence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) { - var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify(message.schemaModifiedCadence); - if (error) - return "schemaModifiedCadence." + error; + DiscoveryOtherCloudFilter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudResourceCollection.verify(message.collection); + if (error) + return "collection." + error; + } } - if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) - switch (message.refreshFrequency) { - default: - return "refreshFrequency: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; + if (message.singleResource != null && message.hasOwnProperty("singleResource")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify(message.singleResource); + if (error) + return "singleResource." + error; + } + } + if (message.others != null && message.hasOwnProperty("others")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.AllOtherResources.verify(message.others); + if (error) + return "others." + error; } - if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { - var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence); - if (error) - return "inspectTemplateModifiedCadence." + error; } return null; }; /** - * Creates a DiscoveryCloudSqlGenerationCadence message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryOtherCloudFilter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} DiscoveryOtherCloudFilter */ - DiscoveryCloudSqlGenerationCadence.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence) + DiscoveryOtherCloudFilter.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence(); - if (object.schemaModifiedCadence != null) { - if (typeof object.schemaModifiedCadence !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.schemaModifiedCadence: object expected"); - message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.fromObject(object.schemaModifiedCadence); + var message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter(); + if (object.collection != null) { + if (typeof object.collection !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudFilter.collection: object expected"); + message.collection = $root.google.privacy.dlp.v2.OtherCloudResourceCollection.fromObject(object.collection); } - switch (object.refreshFrequency) { - default: - if (typeof object.refreshFrequency === "number") { - message.refreshFrequency = object.refreshFrequency; - break; - } - break; - case "UPDATE_FREQUENCY_UNSPECIFIED": - case 0: - message.refreshFrequency = 0; - break; - case "UPDATE_FREQUENCY_NEVER": - case 1: - message.refreshFrequency = 1; - break; - case "UPDATE_FREQUENCY_DAILY": - case 2: - message.refreshFrequency = 2; - break; - case "UPDATE_FREQUENCY_MONTHLY": - case 4: - message.refreshFrequency = 4; - break; + if (object.singleResource != null) { + if (typeof object.singleResource !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudFilter.singleResource: object expected"); + message.singleResource = $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.fromObject(object.singleResource); } - if (object.inspectTemplateModifiedCadence != null) { - if (typeof object.inspectTemplateModifiedCadence !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.inspectTemplateModifiedCadence: object expected"); - message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence); + if (object.others != null) { + if (typeof object.others !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudFilter.others: object expected"); + message.others = $root.google.privacy.dlp.v2.AllOtherResources.fromObject(object.others); } return message; }; /** - * Creates a plain object from a DiscoveryCloudSqlGenerationCadence message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryOtherCloudFilter message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence + * @param {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} message DiscoveryOtherCloudFilter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryCloudSqlGenerationCadence.toObject = function toObject(message, options) { + DiscoveryOtherCloudFilter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.schemaModifiedCadence = null; - object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; - object.inspectTemplateModifiedCadence = null; + if (message.collection != null && message.hasOwnProperty("collection")) { + object.collection = $root.google.privacy.dlp.v2.OtherCloudResourceCollection.toObject(message.collection, options); + if (options.oneofs) + object.filter = "collection"; + } + if (message.singleResource != null && message.hasOwnProperty("singleResource")) { + object.singleResource = $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.toObject(message.singleResource, options); + if (options.oneofs) + object.filter = "singleResource"; + } + if (message.others != null && message.hasOwnProperty("others")) { + object.others = $root.google.privacy.dlp.v2.AllOtherResources.toObject(message.others, options); + if (options.oneofs) + object.filter = "others"; } - if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) - object.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.toObject(message.schemaModifiedCadence, options); - if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) - object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; - if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) - object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); return object; }; /** - * Converts this DiscoveryCloudSqlGenerationCadence to JSON. + * Converts this DiscoveryOtherCloudFilter to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @instance * @returns {Object.} JSON object */ - DiscoveryCloudSqlGenerationCadence.prototype.toJSON = function toJSON() { + DiscoveryOtherCloudFilter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryCloudSqlGenerationCadence + * Gets the default type url for DiscoveryOtherCloudFilter * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryCloudSqlGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryOtherCloudFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryOtherCloudFilter"; }; - DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence = (function() { - - /** - * Properties of a SchemaModifiedCadence. - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence - * @interface ISchemaModifiedCadence - * @property {Array.|null} [types] SchemaModifiedCadence types - * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] SchemaModifiedCadence frequency - */ - - /** - * Constructs a new SchemaModifiedCadence. - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence - * @classdesc Represents a SchemaModifiedCadence. - * @implements ISchemaModifiedCadence - * @constructor - * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence=} [properties] Properties to set - */ - function SchemaModifiedCadence(properties) { - this.types = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + return DiscoveryOtherCloudFilter; + })(); - /** - * SchemaModifiedCadence types. - * @member {Array.} types - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @instance - */ - SchemaModifiedCadence.prototype.types = $util.emptyArray; + v2.OtherCloudResourceCollection = (function() { - /** - * SchemaModifiedCadence frequency. - * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @instance - */ - SchemaModifiedCadence.prototype.frequency = 0; + /** + * Properties of an OtherCloudResourceCollection. + * @memberof google.privacy.dlp.v2 + * @interface IOtherCloudResourceCollection + * @property {google.privacy.dlp.v2.IOtherCloudResourceRegexes|null} [includeRegexes] OtherCloudResourceCollection includeRegexes + */ - /** - * Creates a new SchemaModifiedCadence instance using the specified properties. - * @function create - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence instance - */ - SchemaModifiedCadence.create = function create(properties) { - return new SchemaModifiedCadence(properties); - }; + /** + * Constructs a new OtherCloudResourceCollection. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OtherCloudResourceCollection. + * @implements IOtherCloudResourceCollection + * @constructor + * @param {google.privacy.dlp.v2.IOtherCloudResourceCollection=} [properties] Properties to set + */ + function OtherCloudResourceCollection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Encodes the specified SchemaModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify|verify} messages. - * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence} message SchemaModifiedCadence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaModifiedCadence.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.types != null && message.types.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.types.length; ++i) - writer.int32(message.types[i]); - writer.ldelim(); - } - if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); - return writer; - }; + /** + * OtherCloudResourceCollection includeRegexes. + * @member {google.privacy.dlp.v2.IOtherCloudResourceRegexes|null|undefined} includeRegexes + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @instance + */ + OtherCloudResourceCollection.prototype.includeRegexes = null; - /** - * Encodes the specified SchemaModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify|verify} messages. - * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence} message SchemaModifiedCadence message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Decodes a SchemaModifiedCadence message from the specified reader or buffer. - * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaModifiedCadence.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.types && message.types.length)) - message.types = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.types.push(reader.int32()); - } else - message.types.push(reader.int32()); - break; - } - case 2: { - message.frequency = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * OtherCloudResourceCollection pattern. + * @member {"includeRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @instance + */ + Object.defineProperty(OtherCloudResourceCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a SchemaModifiedCadence message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaModifiedCadence.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Creates a new OtherCloudResourceCollection instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudResourceCollection} OtherCloudResourceCollection instance + */ + OtherCloudResourceCollection.create = function create(properties) { + return new OtherCloudResourceCollection(properties); + }; - /** - * Verifies a SchemaModifiedCadence message. - * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaModifiedCadence.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.types != null && message.hasOwnProperty("types")) { - if (!Array.isArray(message.types)) - return "types: array expected"; - for (var i = 0; i < message.types.length; ++i) - switch (message.types[i]) { - default: - return "types: enum value[] expected"; - case 0: - case 1: - case 2: - break; - } - } - if (message.frequency != null && message.hasOwnProperty("frequency")) - switch (message.frequency) { - default: - return "frequency: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } - return null; - }; + /** + * Encodes the specified OtherCloudResourceCollection message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceCollection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceCollection} message OtherCloudResourceCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudResourceCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) + $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; - /** - * Creates a SchemaModifiedCadence message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence - */ - SchemaModifiedCadence.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence) - return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence(); - if (object.types) { - if (!Array.isArray(object.types)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.types: array expected"); - message.types = []; - for (var i = 0; i < object.types.length; ++i) - switch (object.types[i]) { - default: - if (typeof object.types[i] === "number") { - message.types[i] = object.types[i]; - break; - } - case "SQL_SCHEMA_MODIFICATION_UNSPECIFIED": - case 0: - message.types[i] = 0; - break; - case "NEW_COLUMNS": - case 1: - message.types[i] = 1; - break; - case "REMOVED_COLUMNS": - case 2: - message.types[i] = 2; - break; - } - } - switch (object.frequency) { - default: - if (typeof object.frequency === "number") { - message.frequency = object.frequency; + /** + * Encodes the specified OtherCloudResourceCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceCollection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceCollection} message OtherCloudResourceCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudResourceCollection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OtherCloudResourceCollection message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudResourceCollection} OtherCloudResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudResourceCollection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudResourceCollection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.includeRegexes = $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.decode(reader, reader.uint32()); break; } - break; - case "UPDATE_FREQUENCY_UNSPECIFIED": - case 0: - message.frequency = 0; - break; - case "UPDATE_FREQUENCY_NEVER": - case 1: - message.frequency = 1; - break; - case "UPDATE_FREQUENCY_DAILY": - case 2: - message.frequency = 2; - break; - case "UPDATE_FREQUENCY_MONTHLY": - case 4: - message.frequency = 4; + default: + reader.skipType(tag & 7); break; } - return message; - }; + } + return message; + }; - /** - * Creates a plain object from a SchemaModifiedCadence message. Also converts values to other types if specified. - * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} message SchemaModifiedCadence - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaModifiedCadence.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.types = []; - if (options.defaults) - object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; - if (message.types && message.types.length) { - object.types = []; - for (var j = 0; j < message.types.length; ++j) - object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification[message.types[j]] : message.types[j]; + /** + * Decodes an OtherCloudResourceCollection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudResourceCollection} OtherCloudResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudResourceCollection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OtherCloudResourceCollection message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherCloudResourceCollection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.verify(message.includeRegexes); + if (error) + return "includeRegexes." + error; } - if (message.frequency != null && message.hasOwnProperty("frequency")) - object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; - return object; - }; + } + return null; + }; - /** - * Converts this SchemaModifiedCadence to JSON. - * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @instance - * @returns {Object.} JSON object - */ - SchemaModifiedCadence.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an OtherCloudResourceCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudResourceCollection} OtherCloudResourceCollection + */ + OtherCloudResourceCollection.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudResourceCollection) + return object; + var message = new $root.google.privacy.dlp.v2.OtherCloudResourceCollection(); + if (object.includeRegexes != null) { + if (typeof object.includeRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudResourceCollection.includeRegexes: object expected"); + message.includeRegexes = $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.fromObject(object.includeRegexes); + } + return message; + }; - /** - * Gets the default type url for SchemaModifiedCadence - * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchemaModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence"; - }; + /** + * Creates a plain object from an OtherCloudResourceCollection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {google.privacy.dlp.v2.OtherCloudResourceCollection} message OtherCloudResourceCollection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OtherCloudResourceCollection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + object.includeRegexes = $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.toObject(message.includeRegexes, options); + if (options.oneofs) + object.pattern = "includeRegexes"; + } + return object; + }; - /** - * CloudSqlSchemaModification enum. - * @name google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification - * @enum {number} - * @property {number} SQL_SCHEMA_MODIFICATION_UNSPECIFIED=0 SQL_SCHEMA_MODIFICATION_UNSPECIFIED value - * @property {number} NEW_COLUMNS=1 NEW_COLUMNS value - * @property {number} REMOVED_COLUMNS=2 REMOVED_COLUMNS value - */ - SchemaModifiedCadence.CloudSqlSchemaModification = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SQL_SCHEMA_MODIFICATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "NEW_COLUMNS"] = 1; - values[valuesById[2] = "REMOVED_COLUMNS"] = 2; - return values; - })(); + /** + * Converts this OtherCloudResourceCollection to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @instance + * @returns {Object.} JSON object + */ + OtherCloudResourceCollection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return SchemaModifiedCadence; - })(); + /** + * Gets the default type url for OtherCloudResourceCollection + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OtherCloudResourceCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudResourceCollection"; + }; - return DiscoveryCloudSqlGenerationCadence; + return OtherCloudResourceCollection; })(); - v2.SecretsDiscoveryTarget = (function() { + v2.OtherCloudResourceRegexes = (function() { /** - * Properties of a SecretsDiscoveryTarget. + * Properties of an OtherCloudResourceRegexes. * @memberof google.privacy.dlp.v2 - * @interface ISecretsDiscoveryTarget + * @interface IOtherCloudResourceRegexes + * @property {Array.|null} [patterns] OtherCloudResourceRegexes patterns */ /** - * Constructs a new SecretsDiscoveryTarget. + * Constructs a new OtherCloudResourceRegexes. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a SecretsDiscoveryTarget. - * @implements ISecretsDiscoveryTarget + * @classdesc Represents an OtherCloudResourceRegexes. + * @implements IOtherCloudResourceRegexes * @constructor - * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegexes=} [properties] Properties to set */ - function SecretsDiscoveryTarget(properties) { + function OtherCloudResourceRegexes(properties) { + this.patterns = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -59872,63 +64131,80 @@ } /** - * Creates a new SecretsDiscoveryTarget instance using the specified properties. + * OtherCloudResourceRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @instance + */ + OtherCloudResourceRegexes.prototype.patterns = $util.emptyArray; + + /** + * Creates a new OtherCloudResourceRegexes instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static - * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget instance + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegexes} OtherCloudResourceRegexes instance */ - SecretsDiscoveryTarget.create = function create(properties) { - return new SecretsDiscoveryTarget(properties); + OtherCloudResourceRegexes.create = function create(properties) { + return new OtherCloudResourceRegexes(properties); }; /** - * Encodes the specified SecretsDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.SecretsDiscoveryTarget.verify|verify} messages. + * Encodes the specified OtherCloudResourceRegexes message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegexes.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static - * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget} message SecretsDiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegexes} message OtherCloudResourceRegexes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecretsDiscoveryTarget.encode = function encode(message, writer) { + OtherCloudResourceRegexes.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.OtherCloudResourceRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SecretsDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SecretsDiscoveryTarget.verify|verify} messages. + * Encodes the specified OtherCloudResourceRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegexes.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static - * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget} message SecretsDiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegexes} message OtherCloudResourceRegexes message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecretsDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + OtherCloudResourceRegexes.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecretsDiscoveryTarget message from the specified reader or buffer. + * Decodes an OtherCloudResourceRegexes message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegexes} OtherCloudResourceRegexes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecretsDiscoveryTarget.decode = function decode(reader, length) { + OtherCloudResourceRegexes.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SecretsDiscoveryTarget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudResourceRegexes(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.OtherCloudResourceRegex.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -59938,112 +64214,139 @@ }; /** - * Decodes a SecretsDiscoveryTarget message from the specified reader or buffer, length delimited. + * Decodes an OtherCloudResourceRegexes message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegexes} OtherCloudResourceRegexes * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecretsDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + OtherCloudResourceRegexes.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecretsDiscoveryTarget message. + * Verifies an OtherCloudResourceRegexes message. * @function verify - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecretsDiscoveryTarget.verify = function verify(message) { + OtherCloudResourceRegexes.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.OtherCloudResourceRegex.verify(message.patterns[i]); + if (error) + return "patterns." + error; + } + } return null; }; /** - * Creates a SecretsDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * Creates an OtherCloudResourceRegexes message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegexes} OtherCloudResourceRegexes */ - SecretsDiscoveryTarget.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.SecretsDiscoveryTarget) + OtherCloudResourceRegexes.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudResourceRegexes) return object; - return new $root.google.privacy.dlp.v2.SecretsDiscoveryTarget(); + var message = new $root.google.privacy.dlp.v2.OtherCloudResourceRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.OtherCloudResourceRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudResourceRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.OtherCloudResourceRegex.fromObject(object.patterns[i]); + } + } + return message; }; /** - * Creates a plain object from a SecretsDiscoveryTarget message. Also converts values to other types if specified. + * Creates a plain object from an OtherCloudResourceRegexes message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static - * @param {google.privacy.dlp.v2.SecretsDiscoveryTarget} message SecretsDiscoveryTarget + * @param {google.privacy.dlp.v2.OtherCloudResourceRegexes} message OtherCloudResourceRegexes * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecretsDiscoveryTarget.toObject = function toObject() { - return {}; + OtherCloudResourceRegexes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.OtherCloudResourceRegex.toObject(message.patterns[j], options); + } + return object; }; /** - * Converts this SecretsDiscoveryTarget to JSON. + * Converts this OtherCloudResourceRegexes to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @instance * @returns {Object.} JSON object */ - SecretsDiscoveryTarget.prototype.toJSON = function toJSON() { + OtherCloudResourceRegexes.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecretsDiscoveryTarget + * Gets the default type url for OtherCloudResourceRegexes * @function getTypeUrl - * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecretsDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OtherCloudResourceRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.SecretsDiscoveryTarget"; + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudResourceRegexes"; }; - return SecretsDiscoveryTarget; + return OtherCloudResourceRegexes; })(); - v2.CloudStorageDiscoveryTarget = (function() { + v2.OtherCloudResourceRegex = (function() { /** - * Properties of a CloudStorageDiscoveryTarget. + * Properties of an OtherCloudResourceRegex. * @memberof google.privacy.dlp.v2 - * @interface ICloudStorageDiscoveryTarget - * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter|null} [filter] CloudStorageDiscoveryTarget filter - * @property {google.privacy.dlp.v2.IDiscoveryFileStoreConditions|null} [conditions] CloudStorageDiscoveryTarget conditions - * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence|null} [generationCadence] CloudStorageDiscoveryTarget generationCadence - * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] CloudStorageDiscoveryTarget disabled + * @interface IOtherCloudResourceRegex + * @property {google.privacy.dlp.v2.IAmazonS3BucketRegex|null} [amazonS3BucketRegex] OtherCloudResourceRegex amazonS3BucketRegex */ /** - * Constructs a new CloudStorageDiscoveryTarget. + * Constructs a new OtherCloudResourceRegex. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CloudStorageDiscoveryTarget. - * @implements ICloudStorageDiscoveryTarget + * @classdesc Represents an OtherCloudResourceRegex. + * @implements IOtherCloudResourceRegex * @constructor - * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegex=} [properties] Properties to set */ - function CloudStorageDiscoveryTarget(properties) { + function OtherCloudResourceRegex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60051,131 +64354,89 @@ } /** - * CloudStorageDiscoveryTarget filter. - * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter|null|undefined} filter - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget - * @instance - */ - CloudStorageDiscoveryTarget.prototype.filter = null; - - /** - * CloudStorageDiscoveryTarget conditions. - * @member {google.privacy.dlp.v2.IDiscoveryFileStoreConditions|null|undefined} conditions - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget - * @instance - */ - CloudStorageDiscoveryTarget.prototype.conditions = null; - - /** - * CloudStorageDiscoveryTarget generationCadence. - * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence|null|undefined} generationCadence - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget - * @instance - */ - CloudStorageDiscoveryTarget.prototype.generationCadence = null; - - /** - * CloudStorageDiscoveryTarget disabled. - * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * OtherCloudResourceRegex amazonS3BucketRegex. + * @member {google.privacy.dlp.v2.IAmazonS3BucketRegex|null|undefined} amazonS3BucketRegex + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @instance */ - CloudStorageDiscoveryTarget.prototype.disabled = null; + OtherCloudResourceRegex.prototype.amazonS3BucketRegex = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * CloudStorageDiscoveryTarget cadence. - * @member {"generationCadence"|"disabled"|undefined} cadence - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * OtherCloudResourceRegex resourceRegex. + * @member {"amazonS3BucketRegex"|undefined} resourceRegex + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @instance */ - Object.defineProperty(CloudStorageDiscoveryTarget.prototype, "cadence", { - get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), + Object.defineProperty(OtherCloudResourceRegex.prototype, "resourceRegex", { + get: $util.oneOfGetter($oneOfFields = ["amazonS3BucketRegex"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new CloudStorageDiscoveryTarget instance using the specified properties. + * Creates a new OtherCloudResourceRegex instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @static - * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget instance + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegex} OtherCloudResourceRegex instance */ - CloudStorageDiscoveryTarget.create = function create(properties) { - return new CloudStorageDiscoveryTarget(properties); + OtherCloudResourceRegex.create = function create(properties) { + return new OtherCloudResourceRegex(properties); }; /** - * Encodes the specified CloudStorageDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify|verify} messages. + * Encodes the specified OtherCloudResourceRegex message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegex.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @static - * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegex} message OtherCloudResourceRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageDiscoveryTarget.encode = function encode(message, writer) { + OtherCloudResourceRegex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) - $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) - $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.encode(message.conditions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.amazonS3BucketRegex != null && Object.hasOwnProperty.call(message, "amazonS3BucketRegex")) + $root.google.privacy.dlp.v2.AmazonS3BucketRegex.encode(message.amazonS3BucketRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudStorageDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify|verify} messages. + * Encodes the specified OtherCloudResourceRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegex.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @static - * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegex} message OtherCloudResourceRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + OtherCloudResourceRegex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudStorageDiscoveryTarget message from the specified reader or buffer. + * Decodes an OtherCloudResourceRegex message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegex} OtherCloudResourceRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudStorageDiscoveryTarget.decode = function decode(reader, length) { + OtherCloudResourceRegex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudResourceRegex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.decode(reader, reader.uint32()); - break; - } - case 4: { - message.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.decode(reader, reader.uint32()); - break; - } - case 2: { - message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.decode(reader, reader.uint32()); - break; - } - case 3: { - message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32()); + message.amazonS3BucketRegex = $root.google.privacy.dlp.v2.AmazonS3BucketRegex.decode(reader, reader.uint32()); break; } default: @@ -60187,182 +64448,132 @@ }; /** - * Decodes a CloudStorageDiscoveryTarget message from the specified reader or buffer, length delimited. + * Decodes an OtherCloudResourceRegex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegex} OtherCloudResourceRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudStorageDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + OtherCloudResourceRegex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudStorageDiscoveryTarget message. - * @function verify - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudStorageDiscoveryTarget.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.conditions != null && message.hasOwnProperty("conditions")) { - var error = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify(message.conditions); - if (error) - return "conditions." + error; - } - if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { - properties.cadence = 1; - { - var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify(message.generationCadence); - if (error) - return "generationCadence." + error; - } - } - if (message.disabled != null && message.hasOwnProperty("disabled")) { - if (properties.cadence === 1) - return "cadence: multiple values"; - properties.cadence = 1; + }; + + /** + * Verifies an OtherCloudResourceRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherCloudResourceRegex.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.amazonS3BucketRegex != null && message.hasOwnProperty("amazonS3BucketRegex")) { + properties.resourceRegex = 1; { - var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled); + var error = $root.google.privacy.dlp.v2.AmazonS3BucketRegex.verify(message.amazonS3BucketRegex); if (error) - return "disabled." + error; + return "amazonS3BucketRegex." + error; } } return null; }; /** - * Creates a CloudStorageDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * Creates an OtherCloudResourceRegex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegex} OtherCloudResourceRegex */ - CloudStorageDiscoveryTarget.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget) + OtherCloudResourceRegex.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudResourceRegex) return object; - var message = new $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget(); - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.filter: object expected"); - message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.fromObject(object.filter); - } - if (object.conditions != null) { - if (typeof object.conditions !== "object") - throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.conditions: object expected"); - message.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.fromObject(object.conditions); - } - if (object.generationCadence != null) { - if (typeof object.generationCadence !== "object") - throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.generationCadence: object expected"); - message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.fromObject(object.generationCadence); - } - if (object.disabled != null) { - if (typeof object.disabled !== "object") - throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.disabled: object expected"); - message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled); + var message = new $root.google.privacy.dlp.v2.OtherCloudResourceRegex(); + if (object.amazonS3BucketRegex != null) { + if (typeof object.amazonS3BucketRegex !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudResourceRegex.amazonS3BucketRegex: object expected"); + message.amazonS3BucketRegex = $root.google.privacy.dlp.v2.AmazonS3BucketRegex.fromObject(object.amazonS3BucketRegex); } return message; }; /** - * Creates a plain object from a CloudStorageDiscoveryTarget message. Also converts values to other types if specified. + * Creates a plain object from an OtherCloudResourceRegex message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @static - * @param {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget + * @param {google.privacy.dlp.v2.OtherCloudResourceRegex} message OtherCloudResourceRegex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudStorageDiscoveryTarget.toObject = function toObject(message, options) { + OtherCloudResourceRegex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.filter = null; - object.conditions = null; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.toObject(message.filter, options); - if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { - object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.toObject(message.generationCadence, options); - if (options.oneofs) - object.cadence = "generationCadence"; - } - if (message.disabled != null && message.hasOwnProperty("disabled")) { - object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (message.amazonS3BucketRegex != null && message.hasOwnProperty("amazonS3BucketRegex")) { + object.amazonS3BucketRegex = $root.google.privacy.dlp.v2.AmazonS3BucketRegex.toObject(message.amazonS3BucketRegex, options); if (options.oneofs) - object.cadence = "disabled"; + object.resourceRegex = "amazonS3BucketRegex"; } - if (message.conditions != null && message.hasOwnProperty("conditions")) - object.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.toObject(message.conditions, options); return object; }; /** - * Converts this CloudStorageDiscoveryTarget to JSON. + * Converts this OtherCloudResourceRegex to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @instance * @returns {Object.} JSON object */ - CloudStorageDiscoveryTarget.prototype.toJSON = function toJSON() { + OtherCloudResourceRegex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudStorageDiscoveryTarget + * Gets the default type url for OtherCloudResourceRegex * @function getTypeUrl - * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudStorageDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OtherCloudResourceRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageDiscoveryTarget"; + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudResourceRegex"; }; - return CloudStorageDiscoveryTarget; + return OtherCloudResourceRegex; })(); - v2.DiscoveryCloudStorageFilter = (function() { + v2.AwsAccountRegex = (function() { /** - * Properties of a DiscoveryCloudStorageFilter. + * Properties of an AwsAccountRegex. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryCloudStorageFilter - * @property {google.privacy.dlp.v2.IFileStoreCollection|null} [collection] DiscoveryCloudStorageFilter collection - * @property {google.privacy.dlp.v2.ICloudStorageResourceReference|null} [cloudStorageResourceReference] DiscoveryCloudStorageFilter cloudStorageResourceReference - * @property {google.privacy.dlp.v2.IAllOtherResources|null} [others] DiscoveryCloudStorageFilter others + * @interface IAwsAccountRegex + * @property {string|null} [accountIdRegex] AwsAccountRegex accountIdRegex */ /** - * Constructs a new DiscoveryCloudStorageFilter. + * Constructs a new AwsAccountRegex. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryCloudStorageFilter. - * @implements IDiscoveryCloudStorageFilter + * @classdesc Represents an AwsAccountRegex. + * @implements IAwsAccountRegex * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IAwsAccountRegex=} [properties] Properties to set */ - function DiscoveryCloudStorageFilter(properties) { + function AwsAccountRegex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60370,117 +64581,75 @@ } /** - * DiscoveryCloudStorageFilter collection. - * @member {google.privacy.dlp.v2.IFileStoreCollection|null|undefined} collection - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter - * @instance - */ - DiscoveryCloudStorageFilter.prototype.collection = null; - - /** - * DiscoveryCloudStorageFilter cloudStorageResourceReference. - * @member {google.privacy.dlp.v2.ICloudStorageResourceReference|null|undefined} cloudStorageResourceReference - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter - * @instance - */ - DiscoveryCloudStorageFilter.prototype.cloudStorageResourceReference = null; - - /** - * DiscoveryCloudStorageFilter others. - * @member {google.privacy.dlp.v2.IAllOtherResources|null|undefined} others - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter - * @instance - */ - DiscoveryCloudStorageFilter.prototype.others = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * DiscoveryCloudStorageFilter filter. - * @member {"collection"|"cloudStorageResourceReference"|"others"|undefined} filter - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * AwsAccountRegex accountIdRegex. + * @member {string} accountIdRegex + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @instance */ - Object.defineProperty(DiscoveryCloudStorageFilter.prototype, "filter", { - get: $util.oneOfGetter($oneOfFields = ["collection", "cloudStorageResourceReference", "others"]), - set: $util.oneOfSetter($oneOfFields) - }); + AwsAccountRegex.prototype.accountIdRegex = ""; /** - * Creates a new DiscoveryCloudStorageFilter instance using the specified properties. + * Creates a new AwsAccountRegex instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter instance + * @param {google.privacy.dlp.v2.IAwsAccountRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AwsAccountRegex} AwsAccountRegex instance */ - DiscoveryCloudStorageFilter.create = function create(properties) { - return new DiscoveryCloudStorageFilter(properties); + AwsAccountRegex.create = function create(properties) { + return new AwsAccountRegex(properties); }; /** - * Encodes the specified DiscoveryCloudStorageFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify|verify} messages. + * Encodes the specified AwsAccountRegex message. Does not implicitly {@link google.privacy.dlp.v2.AwsAccountRegex.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter message or plain object to encode + * @param {google.privacy.dlp.v2.IAwsAccountRegex} message AwsAccountRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudStorageFilter.encode = function encode(message, writer) { + AwsAccountRegex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) - $root.google.privacy.dlp.v2.FileStoreCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.cloudStorageResourceReference != null && Object.hasOwnProperty.call(message, "cloudStorageResourceReference")) - $root.google.privacy.dlp.v2.CloudStorageResourceReference.encode(message.cloudStorageResourceReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.others != null && Object.hasOwnProperty.call(message, "others")) - $root.google.privacy.dlp.v2.AllOtherResources.encode(message.others, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.accountIdRegex != null && Object.hasOwnProperty.call(message, "accountIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountIdRegex); return writer; }; /** - * Encodes the specified DiscoveryCloudStorageFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify|verify} messages. + * Encodes the specified AwsAccountRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AwsAccountRegex.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter message or plain object to encode + * @param {google.privacy.dlp.v2.IAwsAccountRegex} message AwsAccountRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudStorageFilter.encodeDelimited = function encodeDelimited(message, writer) { + AwsAccountRegex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryCloudStorageFilter message from the specified reader or buffer. + * Decodes an AwsAccountRegex message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter + * @returns {google.privacy.dlp.v2.AwsAccountRegex} AwsAccountRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudStorageFilter.decode = function decode(reader, length) { + AwsAccountRegex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AwsAccountRegex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.collection = $root.google.privacy.dlp.v2.FileStoreCollection.decode(reader, reader.uint32()); - break; - } - case 2: { - message.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.decode(reader, reader.uint32()); - break; - } - case 100: { - message.others = $root.google.privacy.dlp.v2.AllOtherResources.decode(reader, reader.uint32()); + message.accountIdRegex = reader.string(); break; } default: @@ -60492,172 +64661,123 @@ }; /** - * Decodes a DiscoveryCloudStorageFilter message from the specified reader or buffer, length delimited. + * Decodes an AwsAccountRegex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter + * @returns {google.privacy.dlp.v2.AwsAccountRegex} AwsAccountRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudStorageFilter.decodeDelimited = function decodeDelimited(reader) { + AwsAccountRegex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryCloudStorageFilter message. + * Verifies an AwsAccountRegex message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryCloudStorageFilter.verify = function verify(message) { + AwsAccountRegex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.collection != null && message.hasOwnProperty("collection")) { - properties.filter = 1; - { - var error = $root.google.privacy.dlp.v2.FileStoreCollection.verify(message.collection); - if (error) - return "collection." + error; - } - } - if (message.cloudStorageResourceReference != null && message.hasOwnProperty("cloudStorageResourceReference")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.privacy.dlp.v2.CloudStorageResourceReference.verify(message.cloudStorageResourceReference); - if (error) - return "cloudStorageResourceReference." + error; - } - } - if (message.others != null && message.hasOwnProperty("others")) { - if (properties.filter === 1) - return "filter: multiple values"; - properties.filter = 1; - { - var error = $root.google.privacy.dlp.v2.AllOtherResources.verify(message.others); - if (error) - return "others." + error; - } - } + if (message.accountIdRegex != null && message.hasOwnProperty("accountIdRegex")) + if (!$util.isString(message.accountIdRegex)) + return "accountIdRegex: string expected"; return null; }; /** - * Creates a DiscoveryCloudStorageFilter message from a plain object. Also converts values to their respective internal types. + * Creates an AwsAccountRegex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter + * @returns {google.privacy.dlp.v2.AwsAccountRegex} AwsAccountRegex */ - DiscoveryCloudStorageFilter.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter) + AwsAccountRegex.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.AwsAccountRegex) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter(); - if (object.collection != null) { - if (typeof object.collection !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.collection: object expected"); - message.collection = $root.google.privacy.dlp.v2.FileStoreCollection.fromObject(object.collection); - } - if (object.cloudStorageResourceReference != null) { - if (typeof object.cloudStorageResourceReference !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.cloudStorageResourceReference: object expected"); - message.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.fromObject(object.cloudStorageResourceReference); - } - if (object.others != null) { - if (typeof object.others !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.others: object expected"); - message.others = $root.google.privacy.dlp.v2.AllOtherResources.fromObject(object.others); - } + var message = new $root.google.privacy.dlp.v2.AwsAccountRegex(); + if (object.accountIdRegex != null) + message.accountIdRegex = String(object.accountIdRegex); return message; }; /** - * Creates a plain object from a DiscoveryCloudStorageFilter message. Also converts values to other types if specified. + * Creates a plain object from an AwsAccountRegex message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter + * @param {google.privacy.dlp.v2.AwsAccountRegex} message AwsAccountRegex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryCloudStorageFilter.toObject = function toObject(message, options) { + AwsAccountRegex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.collection != null && message.hasOwnProperty("collection")) { - object.collection = $root.google.privacy.dlp.v2.FileStoreCollection.toObject(message.collection, options); - if (options.oneofs) - object.filter = "collection"; - } - if (message.cloudStorageResourceReference != null && message.hasOwnProperty("cloudStorageResourceReference")) { - object.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.toObject(message.cloudStorageResourceReference, options); - if (options.oneofs) - object.filter = "cloudStorageResourceReference"; - } - if (message.others != null && message.hasOwnProperty("others")) { - object.others = $root.google.privacy.dlp.v2.AllOtherResources.toObject(message.others, options); - if (options.oneofs) - object.filter = "others"; - } + if (options.defaults) + object.accountIdRegex = ""; + if (message.accountIdRegex != null && message.hasOwnProperty("accountIdRegex")) + object.accountIdRegex = message.accountIdRegex; return object; }; /** - * Converts this DiscoveryCloudStorageFilter to JSON. + * Converts this AwsAccountRegex to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @instance * @returns {Object.} JSON object */ - DiscoveryCloudStorageFilter.prototype.toJSON = function toJSON() { + AwsAccountRegex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryCloudStorageFilter + * Gets the default type url for AwsAccountRegex * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @memberof google.privacy.dlp.v2.AwsAccountRegex * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryCloudStorageFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsAccountRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageFilter"; + return typeUrlPrefix + "/google.privacy.dlp.v2.AwsAccountRegex"; }; - return DiscoveryCloudStorageFilter; + return AwsAccountRegex; })(); - v2.FileStoreCollection = (function() { + v2.AmazonS3BucketRegex = (function() { /** - * Properties of a FileStoreCollection. + * Properties of an AmazonS3BucketRegex. * @memberof google.privacy.dlp.v2 - * @interface IFileStoreCollection - * @property {google.privacy.dlp.v2.IFileStoreRegexes|null} [includeRegexes] FileStoreCollection includeRegexes + * @interface IAmazonS3BucketRegex + * @property {google.privacy.dlp.v2.IAwsAccountRegex|null} [awsAccountRegex] AmazonS3BucketRegex awsAccountRegex + * @property {string|null} [bucketNameRegex] AmazonS3BucketRegex bucketNameRegex */ /** - * Constructs a new FileStoreCollection. + * Constructs a new AmazonS3BucketRegex. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a FileStoreCollection. - * @implements IFileStoreCollection + * @classdesc Represents an AmazonS3BucketRegex. + * @implements IAmazonS3BucketRegex * @constructor - * @param {google.privacy.dlp.v2.IFileStoreCollection=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IAmazonS3BucketRegex=} [properties] Properties to set */ - function FileStoreCollection(properties) { + function AmazonS3BucketRegex(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60665,89 +64785,89 @@ } /** - * FileStoreCollection includeRegexes. - * @member {google.privacy.dlp.v2.IFileStoreRegexes|null|undefined} includeRegexes - * @memberof google.privacy.dlp.v2.FileStoreCollection + * AmazonS3BucketRegex awsAccountRegex. + * @member {google.privacy.dlp.v2.IAwsAccountRegex|null|undefined} awsAccountRegex + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @instance */ - FileStoreCollection.prototype.includeRegexes = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + AmazonS3BucketRegex.prototype.awsAccountRegex = null; /** - * FileStoreCollection pattern. - * @member {"includeRegexes"|undefined} pattern - * @memberof google.privacy.dlp.v2.FileStoreCollection + * AmazonS3BucketRegex bucketNameRegex. + * @member {string} bucketNameRegex + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @instance - */ - Object.defineProperty(FileStoreCollection.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), - set: $util.oneOfSetter($oneOfFields) - }); + */ + AmazonS3BucketRegex.prototype.bucketNameRegex = ""; /** - * Creates a new FileStoreCollection instance using the specified properties. + * Creates a new AmazonS3BucketRegex instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static - * @param {google.privacy.dlp.v2.IFileStoreCollection=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection instance + * @param {google.privacy.dlp.v2.IAmazonS3BucketRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AmazonS3BucketRegex} AmazonS3BucketRegex instance */ - FileStoreCollection.create = function create(properties) { - return new FileStoreCollection(properties); + AmazonS3BucketRegex.create = function create(properties) { + return new AmazonS3BucketRegex(properties); }; /** - * Encodes the specified FileStoreCollection message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreCollection.verify|verify} messages. + * Encodes the specified AmazonS3BucketRegex message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketRegex.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static - * @param {google.privacy.dlp.v2.IFileStoreCollection} message FileStoreCollection message or plain object to encode + * @param {google.privacy.dlp.v2.IAmazonS3BucketRegex} message AmazonS3BucketRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileStoreCollection.encode = function encode(message, writer) { + AmazonS3BucketRegex.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) - $root.google.privacy.dlp.v2.FileStoreRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.awsAccountRegex != null && Object.hasOwnProperty.call(message, "awsAccountRegex")) + $root.google.privacy.dlp.v2.AwsAccountRegex.encode(message.awsAccountRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bucketNameRegex != null && Object.hasOwnProperty.call(message, "bucketNameRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketNameRegex); return writer; }; /** - * Encodes the specified FileStoreCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreCollection.verify|verify} messages. + * Encodes the specified AmazonS3BucketRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketRegex.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static - * @param {google.privacy.dlp.v2.IFileStoreCollection} message FileStoreCollection message or plain object to encode + * @param {google.privacy.dlp.v2.IAmazonS3BucketRegex} message AmazonS3BucketRegex message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileStoreCollection.encodeDelimited = function encodeDelimited(message, writer) { + AmazonS3BucketRegex.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileStoreCollection message from the specified reader or buffer. + * Decodes an AmazonS3BucketRegex message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection + * @returns {google.privacy.dlp.v2.AmazonS3BucketRegex} AmazonS3BucketRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileStoreCollection.decode = function decode(reader, length) { + AmazonS3BucketRegex.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreCollection(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AmazonS3BucketRegex(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.decode(reader, reader.uint32()); + message.awsAccountRegex = $root.google.privacy.dlp.v2.AwsAccountRegex.decode(reader, reader.uint32()); + break; + } + case 2: { + message.bucketNameRegex = reader.string(); break; } default: @@ -60759,133 +64879,136 @@ }; /** - * Decodes a FileStoreCollection message from the specified reader or buffer, length delimited. + * Decodes an AmazonS3BucketRegex message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection + * @returns {google.privacy.dlp.v2.AmazonS3BucketRegex} AmazonS3BucketRegex * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileStoreCollection.decodeDelimited = function decodeDelimited(reader) { + AmazonS3BucketRegex.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileStoreCollection message. + * Verifies an AmazonS3BucketRegex message. * @function verify - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileStoreCollection.verify = function verify(message) { + AmazonS3BucketRegex.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { - properties.pattern = 1; - { - var error = $root.google.privacy.dlp.v2.FileStoreRegexes.verify(message.includeRegexes); - if (error) - return "includeRegexes." + error; - } + if (message.awsAccountRegex != null && message.hasOwnProperty("awsAccountRegex")) { + var error = $root.google.privacy.dlp.v2.AwsAccountRegex.verify(message.awsAccountRegex); + if (error) + return "awsAccountRegex." + error; } + if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) + if (!$util.isString(message.bucketNameRegex)) + return "bucketNameRegex: string expected"; return null; }; /** - * Creates a FileStoreCollection message from a plain object. Also converts values to their respective internal types. + * Creates an AmazonS3BucketRegex message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection + * @returns {google.privacy.dlp.v2.AmazonS3BucketRegex} AmazonS3BucketRegex */ - FileStoreCollection.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.FileStoreCollection) + AmazonS3BucketRegex.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.AmazonS3BucketRegex) return object; - var message = new $root.google.privacy.dlp.v2.FileStoreCollection(); - if (object.includeRegexes != null) { - if (typeof object.includeRegexes !== "object") - throw TypeError(".google.privacy.dlp.v2.FileStoreCollection.includeRegexes: object expected"); - message.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.fromObject(object.includeRegexes); + var message = new $root.google.privacy.dlp.v2.AmazonS3BucketRegex(); + if (object.awsAccountRegex != null) { + if (typeof object.awsAccountRegex !== "object") + throw TypeError(".google.privacy.dlp.v2.AmazonS3BucketRegex.awsAccountRegex: object expected"); + message.awsAccountRegex = $root.google.privacy.dlp.v2.AwsAccountRegex.fromObject(object.awsAccountRegex); } + if (object.bucketNameRegex != null) + message.bucketNameRegex = String(object.bucketNameRegex); return message; }; /** - * Creates a plain object from a FileStoreCollection message. Also converts values to other types if specified. + * Creates a plain object from an AmazonS3BucketRegex message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static - * @param {google.privacy.dlp.v2.FileStoreCollection} message FileStoreCollection + * @param {google.privacy.dlp.v2.AmazonS3BucketRegex} message AmazonS3BucketRegex * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileStoreCollection.toObject = function toObject(message, options) { + AmazonS3BucketRegex.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { - object.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.toObject(message.includeRegexes, options); - if (options.oneofs) - object.pattern = "includeRegexes"; + if (options.defaults) { + object.awsAccountRegex = null; + object.bucketNameRegex = ""; } + if (message.awsAccountRegex != null && message.hasOwnProperty("awsAccountRegex")) + object.awsAccountRegex = $root.google.privacy.dlp.v2.AwsAccountRegex.toObject(message.awsAccountRegex, options); + if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) + object.bucketNameRegex = message.bucketNameRegex; return object; }; /** - * Converts this FileStoreCollection to JSON. + * Converts this AmazonS3BucketRegex to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @instance * @returns {Object.} JSON object */ - FileStoreCollection.prototype.toJSON = function toJSON() { + AmazonS3BucketRegex.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileStoreCollection + * Gets the default type url for AmazonS3BucketRegex * @function getTypeUrl - * @memberof google.privacy.dlp.v2.FileStoreCollection + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileStoreCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AmazonS3BucketRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreCollection"; + return typeUrlPrefix + "/google.privacy.dlp.v2.AmazonS3BucketRegex"; }; - return FileStoreCollection; + return AmazonS3BucketRegex; })(); - v2.FileStoreRegexes = (function() { + v2.OtherCloudSingleResourceReference = (function() { /** - * Properties of a FileStoreRegexes. + * Properties of an OtherCloudSingleResourceReference. * @memberof google.privacy.dlp.v2 - * @interface IFileStoreRegexes - * @property {Array.|null} [patterns] FileStoreRegexes patterns + * @interface IOtherCloudSingleResourceReference + * @property {google.privacy.dlp.v2.IAmazonS3Bucket|null} [amazonS3Bucket] OtherCloudSingleResourceReference amazonS3Bucket */ /** - * Constructs a new FileStoreRegexes. + * Constructs a new OtherCloudSingleResourceReference. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a FileStoreRegexes. - * @implements IFileStoreRegexes + * @classdesc Represents an OtherCloudSingleResourceReference. + * @implements IOtherCloudSingleResourceReference * @constructor - * @param {google.privacy.dlp.v2.IFileStoreRegexes=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IOtherCloudSingleResourceReference=} [properties] Properties to set */ - function FileStoreRegexes(properties) { - this.patterns = []; + function OtherCloudSingleResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -60893,78 +65016,89 @@ } /** - * FileStoreRegexes patterns. - * @member {Array.} patterns - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * OtherCloudSingleResourceReference amazonS3Bucket. + * @member {google.privacy.dlp.v2.IAmazonS3Bucket|null|undefined} amazonS3Bucket + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @instance */ - FileStoreRegexes.prototype.patterns = $util.emptyArray; + OtherCloudSingleResourceReference.prototype.amazonS3Bucket = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new FileStoreRegexes instance using the specified properties. + * OtherCloudSingleResourceReference resource. + * @member {"amazonS3Bucket"|undefined} resource + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @instance + */ + Object.defineProperty(OtherCloudSingleResourceReference.prototype, "resource", { + get: $util.oneOfGetter($oneOfFields = ["amazonS3Bucket"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OtherCloudSingleResourceReference instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static - * @param {google.privacy.dlp.v2.IFileStoreRegexes=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes instance + * @param {google.privacy.dlp.v2.IOtherCloudSingleResourceReference=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudSingleResourceReference} OtherCloudSingleResourceReference instance */ - FileStoreRegexes.create = function create(properties) { - return new FileStoreRegexes(properties); + OtherCloudSingleResourceReference.create = function create(properties) { + return new OtherCloudSingleResourceReference(properties); }; /** - * Encodes the specified FileStoreRegexes message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegexes.verify|verify} messages. + * Encodes the specified OtherCloudSingleResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static - * @param {google.privacy.dlp.v2.IFileStoreRegexes} message FileStoreRegexes message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudSingleResourceReference} message OtherCloudSingleResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileStoreRegexes.encode = function encode(message, writer) { + OtherCloudSingleResourceReference.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.patterns != null && message.patterns.length) - for (var i = 0; i < message.patterns.length; ++i) - $root.google.privacy.dlp.v2.FileStoreRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.amazonS3Bucket != null && Object.hasOwnProperty.call(message, "amazonS3Bucket")) + $root.google.privacy.dlp.v2.AmazonS3Bucket.encode(message.amazonS3Bucket, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified FileStoreRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegexes.verify|verify} messages. + * Encodes the specified OtherCloudSingleResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static - * @param {google.privacy.dlp.v2.IFileStoreRegexes} message FileStoreRegexes message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudSingleResourceReference} message OtherCloudSingleResourceReference message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileStoreRegexes.encodeDelimited = function encodeDelimited(message, writer) { + OtherCloudSingleResourceReference.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileStoreRegexes message from the specified reader or buffer. + * Decodes an OtherCloudSingleResourceReference message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes + * @returns {google.privacy.dlp.v2.OtherCloudSingleResourceReference} OtherCloudSingleResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileStoreRegexes.decode = function decode(reader, length) { + OtherCloudSingleResourceReference.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreRegexes(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.patterns && message.patterns.length)) - message.patterns = []; - message.patterns.push($root.google.privacy.dlp.v2.FileStoreRegex.decode(reader, reader.uint32())); + message.amazonS3Bucket = $root.google.privacy.dlp.v2.AmazonS3Bucket.decode(reader, reader.uint32()); break; } default: @@ -60976,139 +65110,132 @@ }; /** - * Decodes a FileStoreRegexes message from the specified reader or buffer, length delimited. + * Decodes an OtherCloudSingleResourceReference message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes + * @returns {google.privacy.dlp.v2.OtherCloudSingleResourceReference} OtherCloudSingleResourceReference * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileStoreRegexes.decodeDelimited = function decodeDelimited(reader) { + OtherCloudSingleResourceReference.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileStoreRegexes message. + * Verifies an OtherCloudSingleResourceReference message. * @function verify - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileStoreRegexes.verify = function verify(message) { + OtherCloudSingleResourceReference.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.patterns != null && message.hasOwnProperty("patterns")) { - if (!Array.isArray(message.patterns)) - return "patterns: array expected"; - for (var i = 0; i < message.patterns.length; ++i) { - var error = $root.google.privacy.dlp.v2.FileStoreRegex.verify(message.patterns[i]); + var properties = {}; + if (message.amazonS3Bucket != null && message.hasOwnProperty("amazonS3Bucket")) { + properties.resource = 1; + { + var error = $root.google.privacy.dlp.v2.AmazonS3Bucket.verify(message.amazonS3Bucket); if (error) - return "patterns." + error; + return "amazonS3Bucket." + error; } } return null; }; /** - * Creates a FileStoreRegexes message from a plain object. Also converts values to their respective internal types. + * Creates an OtherCloudSingleResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes + * @returns {google.privacy.dlp.v2.OtherCloudSingleResourceReference} OtherCloudSingleResourceReference */ - FileStoreRegexes.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.FileStoreRegexes) + OtherCloudSingleResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference) return object; - var message = new $root.google.privacy.dlp.v2.FileStoreRegexes(); - if (object.patterns) { - if (!Array.isArray(object.patterns)) - throw TypeError(".google.privacy.dlp.v2.FileStoreRegexes.patterns: array expected"); - message.patterns = []; - for (var i = 0; i < object.patterns.length; ++i) { - if (typeof object.patterns[i] !== "object") - throw TypeError(".google.privacy.dlp.v2.FileStoreRegexes.patterns: object expected"); - message.patterns[i] = $root.google.privacy.dlp.v2.FileStoreRegex.fromObject(object.patterns[i]); - } + var message = new $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference(); + if (object.amazonS3Bucket != null) { + if (typeof object.amazonS3Bucket !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudSingleResourceReference.amazonS3Bucket: object expected"); + message.amazonS3Bucket = $root.google.privacy.dlp.v2.AmazonS3Bucket.fromObject(object.amazonS3Bucket); } return message; }; /** - * Creates a plain object from a FileStoreRegexes message. Also converts values to other types if specified. + * Creates a plain object from an OtherCloudSingleResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static - * @param {google.privacy.dlp.v2.FileStoreRegexes} message FileStoreRegexes + * @param {google.privacy.dlp.v2.OtherCloudSingleResourceReference} message OtherCloudSingleResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileStoreRegexes.toObject = function toObject(message, options) { + OtherCloudSingleResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.patterns = []; - if (message.patterns && message.patterns.length) { - object.patterns = []; - for (var j = 0; j < message.patterns.length; ++j) - object.patterns[j] = $root.google.privacy.dlp.v2.FileStoreRegex.toObject(message.patterns[j], options); + if (message.amazonS3Bucket != null && message.hasOwnProperty("amazonS3Bucket")) { + object.amazonS3Bucket = $root.google.privacy.dlp.v2.AmazonS3Bucket.toObject(message.amazonS3Bucket, options); + if (options.oneofs) + object.resource = "amazonS3Bucket"; } return object; }; /** - * Converts this FileStoreRegexes to JSON. + * Converts this OtherCloudSingleResourceReference to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @instance * @returns {Object.} JSON object */ - FileStoreRegexes.prototype.toJSON = function toJSON() { + OtherCloudSingleResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileStoreRegexes + * Gets the default type url for OtherCloudSingleResourceReference * @function getTypeUrl - * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileStoreRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OtherCloudSingleResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreRegexes"; + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudSingleResourceReference"; }; - return FileStoreRegexes; + return OtherCloudSingleResourceReference; })(); - v2.FileStoreRegex = (function() { + v2.AwsAccount = (function() { /** - * Properties of a FileStoreRegex. + * Properties of an AwsAccount. * @memberof google.privacy.dlp.v2 - * @interface IFileStoreRegex - * @property {google.privacy.dlp.v2.ICloudStorageRegex|null} [cloudStorageRegex] FileStoreRegex cloudStorageRegex + * @interface IAwsAccount + * @property {string|null} [accountId] AwsAccount accountId */ /** - * Constructs a new FileStoreRegex. + * Constructs a new AwsAccount. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a FileStoreRegex. - * @implements IFileStoreRegex + * @classdesc Represents an AwsAccount. + * @implements IAwsAccount * @constructor - * @param {google.privacy.dlp.v2.IFileStoreRegex=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IAwsAccount=} [properties] Properties to set */ - function FileStoreRegex(properties) { + function AwsAccount(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61116,89 +65243,75 @@ } /** - * FileStoreRegex cloudStorageRegex. - * @member {google.privacy.dlp.v2.ICloudStorageRegex|null|undefined} cloudStorageRegex - * @memberof google.privacy.dlp.v2.FileStoreRegex - * @instance - */ - FileStoreRegex.prototype.cloudStorageRegex = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * FileStoreRegex resourceRegex. - * @member {"cloudStorageRegex"|undefined} resourceRegex - * @memberof google.privacy.dlp.v2.FileStoreRegex + * AwsAccount accountId. + * @member {string} accountId + * @memberof google.privacy.dlp.v2.AwsAccount * @instance */ - Object.defineProperty(FileStoreRegex.prototype, "resourceRegex", { - get: $util.oneOfGetter($oneOfFields = ["cloudStorageRegex"]), - set: $util.oneOfSetter($oneOfFields) - }); + AwsAccount.prototype.accountId = ""; /** - * Creates a new FileStoreRegex instance using the specified properties. + * Creates a new AwsAccount instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static - * @param {google.privacy.dlp.v2.IFileStoreRegex=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex instance + * @param {google.privacy.dlp.v2.IAwsAccount=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AwsAccount} AwsAccount instance */ - FileStoreRegex.create = function create(properties) { - return new FileStoreRegex(properties); + AwsAccount.create = function create(properties) { + return new AwsAccount(properties); }; /** - * Encodes the specified FileStoreRegex message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegex.verify|verify} messages. + * Encodes the specified AwsAccount message. Does not implicitly {@link google.privacy.dlp.v2.AwsAccount.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static - * @param {google.privacy.dlp.v2.IFileStoreRegex} message FileStoreRegex message or plain object to encode + * @param {google.privacy.dlp.v2.IAwsAccount} message AwsAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileStoreRegex.encode = function encode(message, writer) { + AwsAccount.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.cloudStorageRegex != null && Object.hasOwnProperty.call(message, "cloudStorageRegex")) - $root.google.privacy.dlp.v2.CloudStorageRegex.encode(message.cloudStorageRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountId); return writer; }; /** - * Encodes the specified FileStoreRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegex.verify|verify} messages. + * Encodes the specified AwsAccount message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AwsAccount.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static - * @param {google.privacy.dlp.v2.IFileStoreRegex} message FileStoreRegex message or plain object to encode + * @param {google.privacy.dlp.v2.IAwsAccount} message AwsAccount message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FileStoreRegex.encodeDelimited = function encodeDelimited(message, writer) { + AwsAccount.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FileStoreRegex message from the specified reader or buffer. + * Decodes an AwsAccount message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex + * @returns {google.privacy.dlp.v2.AwsAccount} AwsAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileStoreRegex.decode = function decode(reader, length) { + AwsAccount.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreRegex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AwsAccount(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.decode(reader, reader.uint32()); + message.accountId = reader.string(); break; } default: @@ -61210,133 +65323,123 @@ }; /** - * Decodes a FileStoreRegex message from the specified reader or buffer, length delimited. + * Decodes an AwsAccount message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex + * @returns {google.privacy.dlp.v2.AwsAccount} AwsAccount * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FileStoreRegex.decodeDelimited = function decodeDelimited(reader) { + AwsAccount.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FileStoreRegex message. + * Verifies an AwsAccount message. * @function verify - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FileStoreRegex.verify = function verify(message) { + AwsAccount.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.cloudStorageRegex != null && message.hasOwnProperty("cloudStorageRegex")) { - properties.resourceRegex = 1; - { - var error = $root.google.privacy.dlp.v2.CloudStorageRegex.verify(message.cloudStorageRegex); - if (error) - return "cloudStorageRegex." + error; - } - } + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (!$util.isString(message.accountId)) + return "accountId: string expected"; return null; }; /** - * Creates a FileStoreRegex message from a plain object. Also converts values to their respective internal types. + * Creates an AwsAccount message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static - * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex - */ - FileStoreRegex.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.FileStoreRegex) - return object; - var message = new $root.google.privacy.dlp.v2.FileStoreRegex(); - if (object.cloudStorageRegex != null) { - if (typeof object.cloudStorageRegex !== "object") - throw TypeError(".google.privacy.dlp.v2.FileStoreRegex.cloudStorageRegex: object expected"); - message.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.fromObject(object.cloudStorageRegex); - } + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AwsAccount} AwsAccount + */ + AwsAccount.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.AwsAccount) + return object; + var message = new $root.google.privacy.dlp.v2.AwsAccount(); + if (object.accountId != null) + message.accountId = String(object.accountId); return message; }; /** - * Creates a plain object from a FileStoreRegex message. Also converts values to other types if specified. + * Creates a plain object from an AwsAccount message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static - * @param {google.privacy.dlp.v2.FileStoreRegex} message FileStoreRegex + * @param {google.privacy.dlp.v2.AwsAccount} message AwsAccount * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileStoreRegex.toObject = function toObject(message, options) { + AwsAccount.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.cloudStorageRegex != null && message.hasOwnProperty("cloudStorageRegex")) { - object.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.toObject(message.cloudStorageRegex, options); - if (options.oneofs) - object.resourceRegex = "cloudStorageRegex"; - } + if (options.defaults) + object.accountId = ""; + if (message.accountId != null && message.hasOwnProperty("accountId")) + object.accountId = message.accountId; return object; }; /** - * Converts this FileStoreRegex to JSON. + * Converts this AwsAccount to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @instance * @returns {Object.} JSON object */ - FileStoreRegex.prototype.toJSON = function toJSON() { + AwsAccount.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FileStoreRegex + * Gets the default type url for AwsAccount * @function getTypeUrl - * @memberof google.privacy.dlp.v2.FileStoreRegex + * @memberof google.privacy.dlp.v2.AwsAccount * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FileStoreRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AwsAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreRegex"; + return typeUrlPrefix + "/google.privacy.dlp.v2.AwsAccount"; }; - return FileStoreRegex; + return AwsAccount; })(); - v2.CloudStorageRegex = (function() { + v2.AmazonS3Bucket = (function() { /** - * Properties of a CloudStorageRegex. + * Properties of an AmazonS3Bucket. * @memberof google.privacy.dlp.v2 - * @interface ICloudStorageRegex - * @property {string|null} [projectIdRegex] CloudStorageRegex projectIdRegex - * @property {string|null} [bucketNameRegex] CloudStorageRegex bucketNameRegex + * @interface IAmazonS3Bucket + * @property {google.privacy.dlp.v2.IAwsAccount|null} [awsAccount] AmazonS3Bucket awsAccount + * @property {string|null} [bucketName] AmazonS3Bucket bucketName */ /** - * Constructs a new CloudStorageRegex. + * Constructs a new AmazonS3Bucket. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CloudStorageRegex. - * @implements ICloudStorageRegex + * @classdesc Represents an AmazonS3Bucket. + * @implements IAmazonS3Bucket * @constructor - * @param {google.privacy.dlp.v2.ICloudStorageRegex=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IAmazonS3Bucket=} [properties] Properties to set */ - function CloudStorageRegex(properties) { + function AmazonS3Bucket(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61344,89 +65447,89 @@ } /** - * CloudStorageRegex projectIdRegex. - * @member {string} projectIdRegex - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * AmazonS3Bucket awsAccount. + * @member {google.privacy.dlp.v2.IAwsAccount|null|undefined} awsAccount + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @instance */ - CloudStorageRegex.prototype.projectIdRegex = ""; + AmazonS3Bucket.prototype.awsAccount = null; /** - * CloudStorageRegex bucketNameRegex. - * @member {string} bucketNameRegex - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * AmazonS3Bucket bucketName. + * @member {string} bucketName + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @instance */ - CloudStorageRegex.prototype.bucketNameRegex = ""; + AmazonS3Bucket.prototype.bucketName = ""; /** - * Creates a new CloudStorageRegex instance using the specified properties. + * Creates a new AmazonS3Bucket instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static - * @param {google.privacy.dlp.v2.ICloudStorageRegex=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex instance + * @param {google.privacy.dlp.v2.IAmazonS3Bucket=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AmazonS3Bucket} AmazonS3Bucket instance */ - CloudStorageRegex.create = function create(properties) { - return new CloudStorageRegex(properties); + AmazonS3Bucket.create = function create(properties) { + return new AmazonS3Bucket(properties); }; /** - * Encodes the specified CloudStorageRegex message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegex.verify|verify} messages. + * Encodes the specified AmazonS3Bucket message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3Bucket.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static - * @param {google.privacy.dlp.v2.ICloudStorageRegex} message CloudStorageRegex message or plain object to encode + * @param {google.privacy.dlp.v2.IAmazonS3Bucket} message AmazonS3Bucket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageRegex.encode = function encode(message, writer) { + AmazonS3Bucket.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); - if (message.bucketNameRegex != null && Object.hasOwnProperty.call(message, "bucketNameRegex")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketNameRegex); + if (message.awsAccount != null && Object.hasOwnProperty.call(message, "awsAccount")) + $root.google.privacy.dlp.v2.AwsAccount.encode(message.awsAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketName); return writer; }; /** - * Encodes the specified CloudStorageRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegex.verify|verify} messages. + * Encodes the specified AmazonS3Bucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3Bucket.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static - * @param {google.privacy.dlp.v2.ICloudStorageRegex} message CloudStorageRegex message or plain object to encode + * @param {google.privacy.dlp.v2.IAmazonS3Bucket} message AmazonS3Bucket message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageRegex.encodeDelimited = function encodeDelimited(message, writer) { + AmazonS3Bucket.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudStorageRegex message from the specified reader or buffer. + * Decodes an AmazonS3Bucket message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex + * @returns {google.privacy.dlp.v2.AmazonS3Bucket} AmazonS3Bucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudStorageRegex.decode = function decode(reader, length) { + AmazonS3Bucket.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageRegex(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AmazonS3Bucket(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.projectIdRegex = reader.string(); + message.awsAccount = $root.google.privacy.dlp.v2.AwsAccount.decode(reader, reader.uint32()); break; } case 2: { - message.bucketNameRegex = reader.string(); + message.bucketName = reader.string(); break; } default: @@ -61438,132 +65541,137 @@ }; /** - * Decodes a CloudStorageRegex message from the specified reader or buffer, length delimited. + * Decodes an AmazonS3Bucket message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex + * @returns {google.privacy.dlp.v2.AmazonS3Bucket} AmazonS3Bucket * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudStorageRegex.decodeDelimited = function decodeDelimited(reader) { + AmazonS3Bucket.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudStorageRegex message. + * Verifies an AmazonS3Bucket message. * @function verify - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudStorageRegex.verify = function verify(message) { + AmazonS3Bucket.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) - if (!$util.isString(message.projectIdRegex)) - return "projectIdRegex: string expected"; - if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) - if (!$util.isString(message.bucketNameRegex)) - return "bucketNameRegex: string expected"; + if (message.awsAccount != null && message.hasOwnProperty("awsAccount")) { + var error = $root.google.privacy.dlp.v2.AwsAccount.verify(message.awsAccount); + if (error) + return "awsAccount." + error; + } + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + if (!$util.isString(message.bucketName)) + return "bucketName: string expected"; return null; }; /** - * Creates a CloudStorageRegex message from a plain object. Also converts values to their respective internal types. + * Creates an AmazonS3Bucket message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex + * @returns {google.privacy.dlp.v2.AmazonS3Bucket} AmazonS3Bucket */ - CloudStorageRegex.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CloudStorageRegex) + AmazonS3Bucket.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.AmazonS3Bucket) return object; - var message = new $root.google.privacy.dlp.v2.CloudStorageRegex(); - if (object.projectIdRegex != null) - message.projectIdRegex = String(object.projectIdRegex); - if (object.bucketNameRegex != null) - message.bucketNameRegex = String(object.bucketNameRegex); + var message = new $root.google.privacy.dlp.v2.AmazonS3Bucket(); + if (object.awsAccount != null) { + if (typeof object.awsAccount !== "object") + throw TypeError(".google.privacy.dlp.v2.AmazonS3Bucket.awsAccount: object expected"); + message.awsAccount = $root.google.privacy.dlp.v2.AwsAccount.fromObject(object.awsAccount); + } + if (object.bucketName != null) + message.bucketName = String(object.bucketName); return message; }; /** - * Creates a plain object from a CloudStorageRegex message. Also converts values to other types if specified. + * Creates a plain object from an AmazonS3Bucket message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static - * @param {google.privacy.dlp.v2.CloudStorageRegex} message CloudStorageRegex + * @param {google.privacy.dlp.v2.AmazonS3Bucket} message AmazonS3Bucket * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudStorageRegex.toObject = function toObject(message, options) { + AmazonS3Bucket.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.projectIdRegex = ""; - object.bucketNameRegex = ""; + object.awsAccount = null; + object.bucketName = ""; } - if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) - object.projectIdRegex = message.projectIdRegex; - if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) - object.bucketNameRegex = message.bucketNameRegex; + if (message.awsAccount != null && message.hasOwnProperty("awsAccount")) + object.awsAccount = $root.google.privacy.dlp.v2.AwsAccount.toObject(message.awsAccount, options); + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + object.bucketName = message.bucketName; return object; }; /** - * Converts this CloudStorageRegex to JSON. + * Converts this AmazonS3Bucket to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @instance * @returns {Object.} JSON object */ - CloudStorageRegex.prototype.toJSON = function toJSON() { + AmazonS3Bucket.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudStorageRegex + * Gets the default type url for AmazonS3Bucket * @function getTypeUrl - * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @memberof google.privacy.dlp.v2.AmazonS3Bucket * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudStorageRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AmazonS3Bucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageRegex"; + return typeUrlPrefix + "/google.privacy.dlp.v2.AmazonS3Bucket"; }; - return CloudStorageRegex; + return AmazonS3Bucket; })(); - v2.CloudStorageResourceReference = (function() { + v2.DiscoveryOtherCloudConditions = (function() { /** - * Properties of a CloudStorageResourceReference. + * Properties of a DiscoveryOtherCloudConditions. * @memberof google.privacy.dlp.v2 - * @interface ICloudStorageResourceReference - * @property {string|null} [bucketName] CloudStorageResourceReference bucketName - * @property {string|null} [projectId] CloudStorageResourceReference projectId + * @interface IDiscoveryOtherCloudConditions + * @property {google.protobuf.IDuration|null} [minAge] DiscoveryOtherCloudConditions minAge + * @property {google.privacy.dlp.v2.IAmazonS3BucketConditions|null} [amazonS3BucketConditions] DiscoveryOtherCloudConditions amazonS3BucketConditions */ /** - * Constructs a new CloudStorageResourceReference. + * Constructs a new DiscoveryOtherCloudConditions. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a CloudStorageResourceReference. - * @implements ICloudStorageResourceReference + * @classdesc Represents a DiscoveryOtherCloudConditions. + * @implements IDiscoveryOtherCloudConditions * @constructor - * @param {google.privacy.dlp.v2.ICloudStorageResourceReference=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions=} [properties] Properties to set */ - function CloudStorageResourceReference(properties) { + function DiscoveryOtherCloudConditions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61571,89 +65679,103 @@ } /** - * CloudStorageResourceReference bucketName. - * @member {string} bucketName - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * DiscoveryOtherCloudConditions minAge. + * @member {google.protobuf.IDuration|null|undefined} minAge + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @instance */ - CloudStorageResourceReference.prototype.bucketName = ""; + DiscoveryOtherCloudConditions.prototype.minAge = null; /** - * CloudStorageResourceReference projectId. - * @member {string} projectId - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * DiscoveryOtherCloudConditions amazonS3BucketConditions. + * @member {google.privacy.dlp.v2.IAmazonS3BucketConditions|null|undefined} amazonS3BucketConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @instance */ - CloudStorageResourceReference.prototype.projectId = ""; + DiscoveryOtherCloudConditions.prototype.amazonS3BucketConditions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new CloudStorageResourceReference instance using the specified properties. + * DiscoveryOtherCloudConditions conditions. + * @member {"amazonS3BucketConditions"|undefined} conditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @instance + */ + Object.defineProperty(DiscoveryOtherCloudConditions.prototype, "conditions", { + get: $util.oneOfGetter($oneOfFields = ["amazonS3BucketConditions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryOtherCloudConditions instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static - * @param {google.privacy.dlp.v2.ICloudStorageResourceReference=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference instance + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} DiscoveryOtherCloudConditions instance */ - CloudStorageResourceReference.create = function create(properties) { - return new CloudStorageResourceReference(properties); + DiscoveryOtherCloudConditions.create = function create(properties) { + return new DiscoveryOtherCloudConditions(properties); }; /** - * Encodes the specified CloudStorageResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageResourceReference.verify|verify} messages. + * Encodes the specified DiscoveryOtherCloudConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static - * @param {google.privacy.dlp.v2.ICloudStorageResourceReference} message CloudStorageResourceReference message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions} message DiscoveryOtherCloudConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageResourceReference.encode = function encode(message, writer) { + DiscoveryOtherCloudConditions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketName); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) + $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.amazonS3BucketConditions != null && Object.hasOwnProperty.call(message, "amazonS3BucketConditions")) + $root.google.privacy.dlp.v2.AmazonS3BucketConditions.encode(message.amazonS3BucketConditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified CloudStorageResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageResourceReference.verify|verify} messages. + * Encodes the specified DiscoveryOtherCloudConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static - * @param {google.privacy.dlp.v2.ICloudStorageResourceReference} message CloudStorageResourceReference message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions} message DiscoveryOtherCloudConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CloudStorageResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryOtherCloudConditions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CloudStorageResourceReference message from the specified reader or buffer. + * Decodes a DiscoveryOtherCloudConditions message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} DiscoveryOtherCloudConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudStorageResourceReference.decode = function decode(reader, length) { + DiscoveryOtherCloudConditions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.bucketName = reader.string(); + message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); break; } case 2: { - message.projectId = reader.string(); + message.amazonS3BucketConditions = $root.google.privacy.dlp.v2.AmazonS3BucketConditions.decode(reader, reader.uint32()); break; } default: @@ -61665,132 +65787,149 @@ }; /** - * Decodes a CloudStorageResourceReference message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryOtherCloudConditions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} DiscoveryOtherCloudConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CloudStorageResourceReference.decodeDelimited = function decodeDelimited(reader) { + DiscoveryOtherCloudConditions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CloudStorageResourceReference message. + * Verifies a DiscoveryOtherCloudConditions message. * @function verify - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CloudStorageResourceReference.verify = function verify(message) { + DiscoveryOtherCloudConditions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.bucketName != null && message.hasOwnProperty("bucketName")) - if (!$util.isString(message.bucketName)) - return "bucketName: string expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; + var properties = {}; + if (message.minAge != null && message.hasOwnProperty("minAge")) { + var error = $root.google.protobuf.Duration.verify(message.minAge); + if (error) + return "minAge." + error; + } + if (message.amazonS3BucketConditions != null && message.hasOwnProperty("amazonS3BucketConditions")) { + properties.conditions = 1; + { + var error = $root.google.privacy.dlp.v2.AmazonS3BucketConditions.verify(message.amazonS3BucketConditions); + if (error) + return "amazonS3BucketConditions." + error; + } + } return null; }; /** - * Creates a CloudStorageResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryOtherCloudConditions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} DiscoveryOtherCloudConditions */ - CloudStorageResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.CloudStorageResourceReference) + DiscoveryOtherCloudConditions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions) return object; - var message = new $root.google.privacy.dlp.v2.CloudStorageResourceReference(); - if (object.bucketName != null) - message.bucketName = String(object.bucketName); - if (object.projectId != null) - message.projectId = String(object.projectId); + var message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions(); + if (object.minAge != null) { + if (typeof object.minAge !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudConditions.minAge: object expected"); + message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge); + } + if (object.amazonS3BucketConditions != null) { + if (typeof object.amazonS3BucketConditions !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudConditions.amazonS3BucketConditions: object expected"); + message.amazonS3BucketConditions = $root.google.privacy.dlp.v2.AmazonS3BucketConditions.fromObject(object.amazonS3BucketConditions); + } return message; }; /** - * Creates a plain object from a CloudStorageResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryOtherCloudConditions message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static - * @param {google.privacy.dlp.v2.CloudStorageResourceReference} message CloudStorageResourceReference + * @param {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} message DiscoveryOtherCloudConditions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CloudStorageResourceReference.toObject = function toObject(message, options) { + DiscoveryOtherCloudConditions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.bucketName = ""; - object.projectId = ""; + if (options.defaults) + object.minAge = null; + if (message.minAge != null && message.hasOwnProperty("minAge")) + object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); + if (message.amazonS3BucketConditions != null && message.hasOwnProperty("amazonS3BucketConditions")) { + object.amazonS3BucketConditions = $root.google.privacy.dlp.v2.AmazonS3BucketConditions.toObject(message.amazonS3BucketConditions, options); + if (options.oneofs) + object.conditions = "amazonS3BucketConditions"; } - if (message.bucketName != null && message.hasOwnProperty("bucketName")) - object.bucketName = message.bucketName; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; return object; }; /** - * Converts this CloudStorageResourceReference to JSON. + * Converts this DiscoveryOtherCloudConditions to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @instance * @returns {Object.} JSON object */ - CloudStorageResourceReference.prototype.toJSON = function toJSON() { + DiscoveryOtherCloudConditions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CloudStorageResourceReference + * Gets the default type url for DiscoveryOtherCloudConditions * @function getTypeUrl - * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CloudStorageResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryOtherCloudConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageResourceReference"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryOtherCloudConditions"; }; - return CloudStorageResourceReference; + return DiscoveryOtherCloudConditions; })(); - v2.DiscoveryCloudStorageGenerationCadence = (function() { + v2.AmazonS3BucketConditions = (function() { /** - * Properties of a DiscoveryCloudStorageGenerationCadence. + * Properties of an AmazonS3BucketConditions. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryCloudStorageGenerationCadence - * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryCloudStorageGenerationCadence refreshFrequency - * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryCloudStorageGenerationCadence inspectTemplateModifiedCadence + * @interface IAmazonS3BucketConditions + * @property {Array.|null} [bucketTypes] AmazonS3BucketConditions bucketTypes + * @property {Array.|null} [objectStorageClasses] AmazonS3BucketConditions objectStorageClasses */ /** - * Constructs a new DiscoveryCloudStorageGenerationCadence. + * Constructs a new AmazonS3BucketConditions. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryCloudStorageGenerationCadence. - * @implements IDiscoveryCloudStorageGenerationCadence + * @classdesc Represents an AmazonS3BucketConditions. + * @implements IAmazonS3BucketConditions * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IAmazonS3BucketConditions=} [properties] Properties to set */ - function DiscoveryCloudStorageGenerationCadence(properties) { + function AmazonS3BucketConditions(properties) { + this.bucketTypes = []; + this.objectStorageClasses = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -61798,89 +65937,111 @@ } /** - * DiscoveryCloudStorageGenerationCadence refreshFrequency. - * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * AmazonS3BucketConditions bucketTypes. + * @member {Array.} bucketTypes + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @instance */ - DiscoveryCloudStorageGenerationCadence.prototype.refreshFrequency = 0; - - /** - * DiscoveryCloudStorageGenerationCadence inspectTemplateModifiedCadence. - * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + AmazonS3BucketConditions.prototype.bucketTypes = $util.emptyArray; + + /** + * AmazonS3BucketConditions objectStorageClasses. + * @member {Array.} objectStorageClasses + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @instance */ - DiscoveryCloudStorageGenerationCadence.prototype.inspectTemplateModifiedCadence = null; + AmazonS3BucketConditions.prototype.objectStorageClasses = $util.emptyArray; /** - * Creates a new DiscoveryCloudStorageGenerationCadence instance using the specified properties. + * Creates a new AmazonS3BucketConditions instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence instance + * @param {google.privacy.dlp.v2.IAmazonS3BucketConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AmazonS3BucketConditions} AmazonS3BucketConditions instance */ - DiscoveryCloudStorageGenerationCadence.create = function create(properties) { - return new DiscoveryCloudStorageGenerationCadence(properties); + AmazonS3BucketConditions.create = function create(properties) { + return new AmazonS3BucketConditions(properties); }; /** - * Encodes the specified DiscoveryCloudStorageGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify|verify} messages. + * Encodes the specified AmazonS3BucketConditions message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketConditions.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence message or plain object to encode + * @param {google.privacy.dlp.v2.IAmazonS3BucketConditions} message AmazonS3BucketConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudStorageGenerationCadence.encode = function encode(message, writer) { + AmazonS3BucketConditions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.refreshFrequency); - if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) - $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bucketTypes != null && message.bucketTypes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bucketTypes.length; ++i) + writer.int32(message.bucketTypes[i]); + writer.ldelim(); + } + if (message.objectStorageClasses != null && message.objectStorageClasses.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.objectStorageClasses.length; ++i) + writer.int32(message.objectStorageClasses[i]); + writer.ldelim(); + } return writer; }; /** - * Encodes the specified DiscoveryCloudStorageGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify|verify} messages. + * Encodes the specified AmazonS3BucketConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketConditions.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence message or plain object to encode + * @param {google.privacy.dlp.v2.IAmazonS3BucketConditions} message AmazonS3BucketConditions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudStorageGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { + AmazonS3BucketConditions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryCloudStorageGenerationCadence message from the specified reader or buffer. + * Decodes an AmazonS3BucketConditions message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence + * @returns {google.privacy.dlp.v2.AmazonS3BucketConditions} AmazonS3BucketConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudStorageGenerationCadence.decode = function decode(reader, length) { + AmazonS3BucketConditions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AmazonS3BucketConditions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.refreshFrequency = reader.int32(); + if (!(message.bucketTypes && message.bucketTypes.length)) + message.bucketTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketTypes.push(reader.int32()); + } else + message.bucketTypes.push(reader.int32()); break; } case 2: { - message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32()); + if (!(message.objectStorageClasses && message.objectStorageClasses.length)) + message.objectStorageClasses = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.objectStorageClasses.push(reader.int32()); + } else + message.objectStorageClasses.push(reader.int32()); break; } default: @@ -61892,168 +66053,257 @@ }; /** - * Decodes a DiscoveryCloudStorageGenerationCadence message from the specified reader or buffer, length delimited. + * Decodes an AmazonS3BucketConditions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence + * @returns {google.privacy.dlp.v2.AmazonS3BucketConditions} AmazonS3BucketConditions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudStorageGenerationCadence.decodeDelimited = function decodeDelimited(reader) { + AmazonS3BucketConditions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryCloudStorageGenerationCadence message. + * Verifies an AmazonS3BucketConditions message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryCloudStorageGenerationCadence.verify = function verify(message) { + AmazonS3BucketConditions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) - switch (message.refreshFrequency) { - default: - return "refreshFrequency: enum value expected"; - case 0: - case 1: - case 2: - case 4: - break; - } - if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { - var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence); - if (error) - return "inspectTemplateModifiedCadence." + error; + if (message.bucketTypes != null && message.hasOwnProperty("bucketTypes")) { + if (!Array.isArray(message.bucketTypes)) + return "bucketTypes: array expected"; + for (var i = 0; i < message.bucketTypes.length; ++i) + switch (message.bucketTypes[i]) { + default: + return "bucketTypes: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.objectStorageClasses != null && message.hasOwnProperty("objectStorageClasses")) { + if (!Array.isArray(message.objectStorageClasses)) + return "objectStorageClasses: array expected"; + for (var i = 0; i < message.objectStorageClasses.length; ++i) + switch (message.objectStorageClasses[i]) { + default: + return "objectStorageClasses: enum value[] expected"; + case 0: + case 1: + case 2: + case 4: + case 6: + case 7: + break; + } } return null; }; /** - * Creates a DiscoveryCloudStorageGenerationCadence message from a plain object. Also converts values to their respective internal types. + * Creates an AmazonS3BucketConditions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence + * @returns {google.privacy.dlp.v2.AmazonS3BucketConditions} AmazonS3BucketConditions */ - DiscoveryCloudStorageGenerationCadence.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence) + AmazonS3BucketConditions.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.AmazonS3BucketConditions) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence(); - switch (object.refreshFrequency) { - default: - if (typeof object.refreshFrequency === "number") { - message.refreshFrequency = object.refreshFrequency; - break; - } - break; - case "UPDATE_FREQUENCY_UNSPECIFIED": - case 0: - message.refreshFrequency = 0; - break; - case "UPDATE_FREQUENCY_NEVER": - case 1: - message.refreshFrequency = 1; - break; - case "UPDATE_FREQUENCY_DAILY": - case 2: - message.refreshFrequency = 2; - break; - case "UPDATE_FREQUENCY_MONTHLY": - case 4: - message.refreshFrequency = 4; - break; + var message = new $root.google.privacy.dlp.v2.AmazonS3BucketConditions(); + if (object.bucketTypes) { + if (!Array.isArray(object.bucketTypes)) + throw TypeError(".google.privacy.dlp.v2.AmazonS3BucketConditions.bucketTypes: array expected"); + message.bucketTypes = []; + for (var i = 0; i < object.bucketTypes.length; ++i) + switch (object.bucketTypes[i]) { + default: + if (typeof object.bucketTypes[i] === "number") { + message.bucketTypes[i] = object.bucketTypes[i]; + break; + } + case "TYPE_UNSPECIFIED": + case 0: + message.bucketTypes[i] = 0; + break; + case "TYPE_ALL_SUPPORTED": + case 1: + message.bucketTypes[i] = 1; + break; + case "TYPE_GENERAL_PURPOSE": + case 2: + message.bucketTypes[i] = 2; + break; + } } - if (object.inspectTemplateModifiedCadence != null) { - if (typeof object.inspectTemplateModifiedCadence !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.inspectTemplateModifiedCadence: object expected"); - message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence); + if (object.objectStorageClasses) { + if (!Array.isArray(object.objectStorageClasses)) + throw TypeError(".google.privacy.dlp.v2.AmazonS3BucketConditions.objectStorageClasses: array expected"); + message.objectStorageClasses = []; + for (var i = 0; i < object.objectStorageClasses.length; ++i) + switch (object.objectStorageClasses[i]) { + default: + if (typeof object.objectStorageClasses[i] === "number") { + message.objectStorageClasses[i] = object.objectStorageClasses[i]; + break; + } + case "UNSPECIFIED": + case 0: + message.objectStorageClasses[i] = 0; + break; + case "ALL_SUPPORTED_CLASSES": + case 1: + message.objectStorageClasses[i] = 1; + break; + case "STANDARD": + case 2: + message.objectStorageClasses[i] = 2; + break; + case "STANDARD_INFREQUENT_ACCESS": + case 4: + message.objectStorageClasses[i] = 4; + break; + case "GLACIER_INSTANT_RETRIEVAL": + case 6: + message.objectStorageClasses[i] = 6; + break; + case "INTELLIGENT_TIERING": + case 7: + message.objectStorageClasses[i] = 7; + break; + } } return message; }; /** - * Creates a plain object from a DiscoveryCloudStorageGenerationCadence message. Also converts values to other types if specified. + * Creates a plain object from an AmazonS3BucketConditions message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence + * @param {google.privacy.dlp.v2.AmazonS3BucketConditions} message AmazonS3BucketConditions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryCloudStorageGenerationCadence.toObject = function toObject(message, options) { + AmazonS3BucketConditions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; - object.inspectTemplateModifiedCadence = null; + if (options.arrays || options.defaults) { + object.bucketTypes = []; + object.objectStorageClasses = []; + } + if (message.bucketTypes && message.bucketTypes.length) { + object.bucketTypes = []; + for (var j = 0; j < message.bucketTypes.length; ++j) + object.bucketTypes[j] = options.enums === String ? $root.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType[message.bucketTypes[j]] === undefined ? message.bucketTypes[j] : $root.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType[message.bucketTypes[j]] : message.bucketTypes[j]; + } + if (message.objectStorageClasses && message.objectStorageClasses.length) { + object.objectStorageClasses = []; + for (var j = 0; j < message.objectStorageClasses.length; ++j) + object.objectStorageClasses[j] = options.enums === String ? $root.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass[message.objectStorageClasses[j]] === undefined ? message.objectStorageClasses[j] : $root.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass[message.objectStorageClasses[j]] : message.objectStorageClasses[j]; } - if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) - object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; - if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) - object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); return object; }; /** - * Converts this DiscoveryCloudStorageGenerationCadence to JSON. + * Converts this AmazonS3BucketConditions to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @instance * @returns {Object.} JSON object */ - DiscoveryCloudStorageGenerationCadence.prototype.toJSON = function toJSON() { + AmazonS3BucketConditions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryCloudStorageGenerationCadence + * Gets the default type url for AmazonS3BucketConditions * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryCloudStorageGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AmazonS3BucketConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence"; + return typeUrlPrefix + "/google.privacy.dlp.v2.AmazonS3BucketConditions"; }; - return DiscoveryCloudStorageGenerationCadence; + /** + * BucketType enum. + * @name google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TYPE_ALL_SUPPORTED=1 TYPE_ALL_SUPPORTED value + * @property {number} TYPE_GENERAL_PURPOSE=2 TYPE_GENERAL_PURPOSE value + */ + AmazonS3BucketConditions.BucketType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_ALL_SUPPORTED"] = 1; + values[valuesById[2] = "TYPE_GENERAL_PURPOSE"] = 2; + return values; + })(); + + /** + * ObjectStorageClass enum. + * @name google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} ALL_SUPPORTED_CLASSES=1 ALL_SUPPORTED_CLASSES value + * @property {number} STANDARD=2 STANDARD value + * @property {number} STANDARD_INFREQUENT_ACCESS=4 STANDARD_INFREQUENT_ACCESS value + * @property {number} GLACIER_INSTANT_RETRIEVAL=6 GLACIER_INSTANT_RETRIEVAL value + * @property {number} INTELLIGENT_TIERING=7 INTELLIGENT_TIERING value + */ + AmazonS3BucketConditions.ObjectStorageClass = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SUPPORTED_CLASSES"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + values[valuesById[4] = "STANDARD_INFREQUENT_ACCESS"] = 4; + values[valuesById[6] = "GLACIER_INSTANT_RETRIEVAL"] = 6; + values[valuesById[7] = "INTELLIGENT_TIERING"] = 7; + return values; + })(); + + return AmazonS3BucketConditions; })(); - v2.DiscoveryCloudStorageConditions = (function() { + v2.DiscoveryOtherCloudGenerationCadence = (function() { /** - * Properties of a DiscoveryCloudStorageConditions. + * Properties of a DiscoveryOtherCloudGenerationCadence. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryCloudStorageConditions - * @property {Array.|null} [includedObjectAttributes] DiscoveryCloudStorageConditions includedObjectAttributes - * @property {Array.|null} [includedBucketAttributes] DiscoveryCloudStorageConditions includedBucketAttributes + * @interface IDiscoveryOtherCloudGenerationCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryOtherCloudGenerationCadence refreshFrequency + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryOtherCloudGenerationCadence inspectTemplateModifiedCadence */ /** - * Constructs a new DiscoveryCloudStorageConditions. + * Constructs a new DiscoveryOtherCloudGenerationCadence. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryCloudStorageConditions. - * @implements IDiscoveryCloudStorageConditions + * @classdesc Represents a DiscoveryOtherCloudGenerationCadence. + * @implements IDiscoveryOtherCloudGenerationCadence * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence=} [properties] Properties to set */ - function DiscoveryCloudStorageConditions(properties) { - this.includedObjectAttributes = []; - this.includedBucketAttributes = []; + function DiscoveryOtherCloudGenerationCadence(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62061,111 +66311,89 @@ } /** - * DiscoveryCloudStorageConditions includedObjectAttributes. - * @member {Array.} includedObjectAttributes - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * DiscoveryOtherCloudGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @instance */ - DiscoveryCloudStorageConditions.prototype.includedObjectAttributes = $util.emptyArray; + DiscoveryOtherCloudGenerationCadence.prototype.refreshFrequency = 0; /** - * DiscoveryCloudStorageConditions includedBucketAttributes. - * @member {Array.} includedBucketAttributes - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * DiscoveryOtherCloudGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @instance */ - DiscoveryCloudStorageConditions.prototype.includedBucketAttributes = $util.emptyArray; + DiscoveryOtherCloudGenerationCadence.prototype.inspectTemplateModifiedCadence = null; /** - * Creates a new DiscoveryCloudStorageConditions instance using the specified properties. + * Creates a new DiscoveryOtherCloudGenerationCadence instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions instance + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} DiscoveryOtherCloudGenerationCadence instance */ - DiscoveryCloudStorageConditions.create = function create(properties) { - return new DiscoveryCloudStorageConditions(properties); + DiscoveryOtherCloudGenerationCadence.create = function create(properties) { + return new DiscoveryOtherCloudGenerationCadence(properties); }; /** - * Encodes the specified DiscoveryCloudStorageConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify|verify} messages. + * Encodes the specified DiscoveryOtherCloudGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence} message DiscoveryOtherCloudGenerationCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudStorageConditions.encode = function encode(message, writer) { + DiscoveryOtherCloudGenerationCadence.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.includedObjectAttributes != null && message.includedObjectAttributes.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.includedObjectAttributes.length; ++i) - writer.int32(message.includedObjectAttributes[i]); - writer.ldelim(); - } - if (message.includedBucketAttributes != null && message.includedBucketAttributes.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.includedBucketAttributes.length; ++i) - writer.int32(message.includedBucketAttributes[i]); - writer.ldelim(); - } + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.refreshFrequency); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryCloudStorageConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify|verify} messages. + * Encodes the specified DiscoveryOtherCloudGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static - * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence} message DiscoveryOtherCloudGenerationCadence message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryCloudStorageConditions.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryOtherCloudGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryCloudStorageConditions message from the specified reader or buffer. + * Decodes a DiscoveryOtherCloudGenerationCadence message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} DiscoveryOtherCloudGenerationCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudStorageConditions.decode = function decode(reader, length) { + DiscoveryOtherCloudGenerationCadence.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.includedObjectAttributes && message.includedObjectAttributes.length)) - message.includedObjectAttributes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.includedObjectAttributes.push(reader.int32()); - } else - message.includedObjectAttributes.push(reader.int32()); - break; - } - case 2: { - if (!(message.includedBucketAttributes && message.includedBucketAttributes.length)) - message.includedBucketAttributes = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.includedBucketAttributes.push(reader.int32()); - } else - message.includedBucketAttributes.push(reader.int32()); + message.refreshFrequency = reader.int32(); + break; + } + case 2: { + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32()); break; } default: @@ -62177,286 +66405,166 @@ }; /** - * Decodes a DiscoveryCloudStorageConditions message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryOtherCloudGenerationCadence message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} DiscoveryOtherCloudGenerationCadence * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryCloudStorageConditions.decodeDelimited = function decodeDelimited(reader) { + DiscoveryOtherCloudGenerationCadence.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryCloudStorageConditions message. + * Verifies a DiscoveryOtherCloudGenerationCadence message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryCloudStorageConditions.verify = function verify(message) { + DiscoveryOtherCloudGenerationCadence.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.includedObjectAttributes != null && message.hasOwnProperty("includedObjectAttributes")) { - if (!Array.isArray(message.includedObjectAttributes)) - return "includedObjectAttributes: array expected"; - for (var i = 0; i < message.includedObjectAttributes.length; ++i) - switch (message.includedObjectAttributes[i]) { - default: - return "includedObjectAttributes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message.includedBucketAttributes != null && message.hasOwnProperty("includedBucketAttributes")) { - if (!Array.isArray(message.includedBucketAttributes)) - return "includedBucketAttributes: array expected"; - for (var i = 0; i < message.includedBucketAttributes.length; ++i) - switch (message.includedBucketAttributes[i]) { - default: - return "includedBucketAttributes: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { + default: + return "refreshFrequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence); + if (error) + return "inspectTemplateModifiedCadence." + error; } return null; }; /** - * Creates a DiscoveryCloudStorageConditions message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryOtherCloudGenerationCadence message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} DiscoveryOtherCloudGenerationCadence */ - DiscoveryCloudStorageConditions.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions) + DiscoveryOtherCloudGenerationCadence.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions(); - if (object.includedObjectAttributes) { - if (!Array.isArray(object.includedObjectAttributes)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageConditions.includedObjectAttributes: array expected"); - message.includedObjectAttributes = []; - for (var i = 0; i < object.includedObjectAttributes.length; ++i) - switch (object.includedObjectAttributes[i]) { - default: - if (typeof object.includedObjectAttributes[i] === "number") { - message.includedObjectAttributes[i] = object.includedObjectAttributes[i]; - break; - } - case "CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED": - case 0: - message.includedObjectAttributes[i] = 0; - break; - case "ALL_SUPPORTED_OBJECTS": - case 1: - message.includedObjectAttributes[i] = 1; - break; - case "STANDARD": - case 2: - message.includedObjectAttributes[i] = 2; - break; - case "NEARLINE": - case 3: - message.includedObjectAttributes[i] = 3; - break; - case "COLDLINE": - case 4: - message.includedObjectAttributes[i] = 4; - break; - case "ARCHIVE": - case 5: - message.includedObjectAttributes[i] = 5; - break; - case "REGIONAL": - case 6: - message.includedObjectAttributes[i] = 6; - break; - case "MULTI_REGIONAL": - case 7: - message.includedObjectAttributes[i] = 7; - break; - case "DURABLE_REDUCED_AVAILABILITY": - case 8: - message.includedObjectAttributes[i] = 8; - break; - } + var message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence(); + switch (object.refreshFrequency) { + default: + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.refreshFrequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.refreshFrequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; + break; } - if (object.includedBucketAttributes) { - if (!Array.isArray(object.includedBucketAttributes)) - throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageConditions.includedBucketAttributes: array expected"); - message.includedBucketAttributes = []; - for (var i = 0; i < object.includedBucketAttributes.length; ++i) - switch (object.includedBucketAttributes[i]) { - default: - if (typeof object.includedBucketAttributes[i] === "number") { - message.includedBucketAttributes[i] = object.includedBucketAttributes[i]; - break; - } - case "CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED": - case 0: - message.includedBucketAttributes[i] = 0; - break; - case "ALL_SUPPORTED_BUCKETS": - case 1: - message.includedBucketAttributes[i] = 1; - break; - case "AUTOCLASS_DISABLED": - case 2: - message.includedBucketAttributes[i] = 2; - break; - case "AUTOCLASS_ENABLED": - case 3: - message.includedBucketAttributes[i] = 3; - break; - } + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence); } return message; }; /** - * Creates a plain object from a DiscoveryCloudStorageConditions message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryOtherCloudGenerationCadence message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static - * @param {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions + * @param {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} message DiscoveryOtherCloudGenerationCadence * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryCloudStorageConditions.toObject = function toObject(message, options) { + DiscoveryOtherCloudGenerationCadence.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.includedObjectAttributes = []; - object.includedBucketAttributes = []; - } - if (message.includedObjectAttributes && message.includedObjectAttributes.length) { - object.includedObjectAttributes = []; - for (var j = 0; j < message.includedObjectAttributes.length; ++j) - object.includedObjectAttributes[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute[message.includedObjectAttributes[j]] === undefined ? message.includedObjectAttributes[j] : $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute[message.includedObjectAttributes[j]] : message.includedObjectAttributes[j]; - } - if (message.includedBucketAttributes && message.includedBucketAttributes.length) { - object.includedBucketAttributes = []; - for (var j = 0; j < message.includedBucketAttributes.length; ++j) - object.includedBucketAttributes[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute[message.includedBucketAttributes[j]] === undefined ? message.includedBucketAttributes[j] : $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute[message.includedBucketAttributes[j]] : message.includedBucketAttributes[j]; + if (options.defaults) { + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + object.inspectTemplateModifiedCadence = null; } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); return object; }; /** - * Converts this DiscoveryCloudStorageConditions to JSON. + * Converts this DiscoveryOtherCloudGenerationCadence to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @instance * @returns {Object.} JSON object */ - DiscoveryCloudStorageConditions.prototype.toJSON = function toJSON() { + DiscoveryOtherCloudGenerationCadence.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryCloudStorageConditions + * Gets the default type url for DiscoveryOtherCloudGenerationCadence * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryCloudStorageConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryOtherCloudGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageConditions"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence"; }; - /** - * CloudStorageObjectAttribute enum. - * @name google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute - * @enum {number} - * @property {number} CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED=0 CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED value - * @property {number} ALL_SUPPORTED_OBJECTS=1 ALL_SUPPORTED_OBJECTS value - * @property {number} STANDARD=2 STANDARD value - * @property {number} NEARLINE=3 NEARLINE value - * @property {number} COLDLINE=4 COLDLINE value - * @property {number} ARCHIVE=5 ARCHIVE value - * @property {number} REGIONAL=6 REGIONAL value - * @property {number} MULTI_REGIONAL=7 MULTI_REGIONAL value - * @property {number} DURABLE_REDUCED_AVAILABILITY=8 DURABLE_REDUCED_AVAILABILITY value - */ - DiscoveryCloudStorageConditions.CloudStorageObjectAttribute = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALL_SUPPORTED_OBJECTS"] = 1; - values[valuesById[2] = "STANDARD"] = 2; - values[valuesById[3] = "NEARLINE"] = 3; - values[valuesById[4] = "COLDLINE"] = 4; - values[valuesById[5] = "ARCHIVE"] = 5; - values[valuesById[6] = "REGIONAL"] = 6; - values[valuesById[7] = "MULTI_REGIONAL"] = 7; - values[valuesById[8] = "DURABLE_REDUCED_AVAILABILITY"] = 8; - return values; - })(); - - /** - * CloudStorageBucketAttribute enum. - * @name google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute - * @enum {number} - * @property {number} CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED=0 CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED value - * @property {number} ALL_SUPPORTED_BUCKETS=1 ALL_SUPPORTED_BUCKETS value - * @property {number} AUTOCLASS_DISABLED=2 AUTOCLASS_DISABLED value - * @property {number} AUTOCLASS_ENABLED=3 AUTOCLASS_ENABLED value - */ - DiscoveryCloudStorageConditions.CloudStorageBucketAttribute = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ALL_SUPPORTED_BUCKETS"] = 1; - values[valuesById[2] = "AUTOCLASS_DISABLED"] = 2; - values[valuesById[3] = "AUTOCLASS_ENABLED"] = 3; - return values; - })(); - - return DiscoveryCloudStorageConditions; + return DiscoveryOtherCloudGenerationCadence; })(); - v2.DiscoveryFileStoreConditions = (function() { + v2.DiscoveryStartingLocation = (function() { /** - * Properties of a DiscoveryFileStoreConditions. + * Properties of a DiscoveryStartingLocation. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryFileStoreConditions - * @property {google.protobuf.ITimestamp|null} [createdAfter] DiscoveryFileStoreConditions createdAfter - * @property {google.protobuf.IDuration|null} [minAge] DiscoveryFileStoreConditions minAge - * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions|null} [cloudStorageConditions] DiscoveryFileStoreConditions cloudStorageConditions + * @interface IDiscoveryStartingLocation + * @property {number|Long|null} [organizationId] DiscoveryStartingLocation organizationId + * @property {number|Long|null} [folderId] DiscoveryStartingLocation folderId */ /** - * Constructs a new DiscoveryFileStoreConditions. + * Constructs a new DiscoveryStartingLocation. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryFileStoreConditions. - * @implements IDiscoveryFileStoreConditions + * @classdesc Represents a DiscoveryStartingLocation. + * @implements IDiscoveryStartingLocation * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation=} [properties] Properties to set */ - function DiscoveryFileStoreConditions(properties) { + function DiscoveryStartingLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62464,117 +66572,103 @@ } /** - * DiscoveryFileStoreConditions createdAfter. - * @member {google.protobuf.ITimestamp|null|undefined} createdAfter - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions - * @instance - */ - DiscoveryFileStoreConditions.prototype.createdAfter = null; - - /** - * DiscoveryFileStoreConditions minAge. - * @member {google.protobuf.IDuration|null|undefined} minAge - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * DiscoveryStartingLocation organizationId. + * @member {number|Long|null|undefined} organizationId + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @instance */ - DiscoveryFileStoreConditions.prototype.minAge = null; + DiscoveryStartingLocation.prototype.organizationId = null; /** - * DiscoveryFileStoreConditions cloudStorageConditions. - * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions|null|undefined} cloudStorageConditions - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * DiscoveryStartingLocation folderId. + * @member {number|Long|null|undefined} folderId + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @instance */ - DiscoveryFileStoreConditions.prototype.cloudStorageConditions = null; + DiscoveryStartingLocation.prototype.folderId = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * DiscoveryFileStoreConditions conditions. - * @member {"cloudStorageConditions"|undefined} conditions - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * DiscoveryStartingLocation location. + * @member {"organizationId"|"folderId"|undefined} location + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @instance */ - Object.defineProperty(DiscoveryFileStoreConditions.prototype, "conditions", { - get: $util.oneOfGetter($oneOfFields = ["cloudStorageConditions"]), + Object.defineProperty(DiscoveryStartingLocation.prototype, "location", { + get: $util.oneOfGetter($oneOfFields = ["organizationId", "folderId"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DiscoveryFileStoreConditions instance using the specified properties. + * Creates a new DiscoveryStartingLocation instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static - * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions instance + * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation instance */ - DiscoveryFileStoreConditions.create = function create(properties) { - return new DiscoveryFileStoreConditions(properties); + DiscoveryStartingLocation.create = function create(properties) { + return new DiscoveryStartingLocation(properties); }; /** - * Encodes the specified DiscoveryFileStoreConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify|verify} messages. + * Encodes the specified DiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static - * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions} message DiscoveryFileStoreConditions message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation} message DiscoveryStartingLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryFileStoreConditions.encode = function encode(message, writer) { + DiscoveryStartingLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.createdAfter != null && Object.hasOwnProperty.call(message, "createdAfter")) - $root.google.protobuf.Timestamp.encode(message.createdAfter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) - $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.cloudStorageConditions != null && Object.hasOwnProperty.call(message, "cloudStorageConditions")) - $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.encode(message.cloudStorageConditions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.organizationId); + if (message.folderId != null && Object.hasOwnProperty.call(message, "folderId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.folderId); return writer; }; /** - * Encodes the specified DiscoveryFileStoreConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify|verify} messages. + * Encodes the specified DiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static - * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions} message DiscoveryFileStoreConditions message or plain object to encode + * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation} message DiscoveryStartingLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryFileStoreConditions.encodeDelimited = function encodeDelimited(message, writer) { + DiscoveryStartingLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryFileStoreConditions message from the specified reader or buffer. + * Decodes a DiscoveryStartingLocation message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions + * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryFileStoreConditions.decode = function decode(reader, length) { + DiscoveryStartingLocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryStartingLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.createdAfter = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.organizationId = reader.int64(); break; } case 2: { - message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.decode(reader, reader.uint32()); + message.folderId = reader.int64(); break; } default: @@ -62586,161 +66680,160 @@ }; /** - * Decodes a DiscoveryFileStoreConditions message from the specified reader or buffer, length delimited. + * Decodes a DiscoveryStartingLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions + * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryFileStoreConditions.decodeDelimited = function decodeDelimited(reader) { + DiscoveryStartingLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryFileStoreConditions message. + * Verifies a DiscoveryStartingLocation message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryFileStoreConditions.verify = function verify(message) { + DiscoveryStartingLocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) { - var error = $root.google.protobuf.Timestamp.verify(message.createdAfter); - if (error) - return "createdAfter." + error; - } - if (message.minAge != null && message.hasOwnProperty("minAge")) { - var error = $root.google.protobuf.Duration.verify(message.minAge); - if (error) - return "minAge." + error; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) { + properties.location = 1; + if (!$util.isInteger(message.organizationId) && !(message.organizationId && $util.isInteger(message.organizationId.low) && $util.isInteger(message.organizationId.high))) + return "organizationId: integer|Long expected"; } - if (message.cloudStorageConditions != null && message.hasOwnProperty("cloudStorageConditions")) { - properties.conditions = 1; - { - var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify(message.cloudStorageConditions); - if (error) - return "cloudStorageConditions." + error; - } + if (message.folderId != null && message.hasOwnProperty("folderId")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + if (!$util.isInteger(message.folderId) && !(message.folderId && $util.isInteger(message.folderId.low) && $util.isInteger(message.folderId.high))) + return "folderId: integer|Long expected"; } return null; }; /** - * Creates a DiscoveryFileStoreConditions message from a plain object. Also converts values to their respective internal types. + * Creates a DiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions + * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation */ - DiscoveryFileStoreConditions.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions) + DiscoveryStartingLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryStartingLocation) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions(); - if (object.createdAfter != null) { - if (typeof object.createdAfter !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.createdAfter: object expected"); - message.createdAfter = $root.google.protobuf.Timestamp.fromObject(object.createdAfter); - } - if (object.minAge != null) { - if (typeof object.minAge !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.minAge: object expected"); - message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge); - } - if (object.cloudStorageConditions != null) { - if (typeof object.cloudStorageConditions !== "object") - throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.cloudStorageConditions: object expected"); - message.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.fromObject(object.cloudStorageConditions); - } + var message = new $root.google.privacy.dlp.v2.DiscoveryStartingLocation(); + if (object.organizationId != null) + if ($util.Long) + (message.organizationId = $util.Long.fromValue(object.organizationId)).unsigned = false; + else if (typeof object.organizationId === "string") + message.organizationId = parseInt(object.organizationId, 10); + else if (typeof object.organizationId === "number") + message.organizationId = object.organizationId; + else if (typeof object.organizationId === "object") + message.organizationId = new $util.LongBits(object.organizationId.low >>> 0, object.organizationId.high >>> 0).toNumber(); + if (object.folderId != null) + if ($util.Long) + (message.folderId = $util.Long.fromValue(object.folderId)).unsigned = false; + else if (typeof object.folderId === "string") + message.folderId = parseInt(object.folderId, 10); + else if (typeof object.folderId === "number") + message.folderId = object.folderId; + else if (typeof object.folderId === "object") + message.folderId = new $util.LongBits(object.folderId.low >>> 0, object.folderId.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a DiscoveryFileStoreConditions message. Also converts values to other types if specified. + * Creates a plain object from a DiscoveryStartingLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static - * @param {google.privacy.dlp.v2.DiscoveryFileStoreConditions} message DiscoveryFileStoreConditions + * @param {google.privacy.dlp.v2.DiscoveryStartingLocation} message DiscoveryStartingLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryFileStoreConditions.toObject = function toObject(message, options) { + DiscoveryStartingLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.createdAfter = null; - object.minAge = null; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) { + if (typeof message.organizationId === "number") + object.organizationId = options.longs === String ? String(message.organizationId) : message.organizationId; + else + object.organizationId = options.longs === String ? $util.Long.prototype.toString.call(message.organizationId) : options.longs === Number ? new $util.LongBits(message.organizationId.low >>> 0, message.organizationId.high >>> 0).toNumber() : message.organizationId; + if (options.oneofs) + object.location = "organizationId"; } - if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) - object.createdAfter = $root.google.protobuf.Timestamp.toObject(message.createdAfter, options); - if (message.minAge != null && message.hasOwnProperty("minAge")) - object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); - if (message.cloudStorageConditions != null && message.hasOwnProperty("cloudStorageConditions")) { - object.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.toObject(message.cloudStorageConditions, options); + if (message.folderId != null && message.hasOwnProperty("folderId")) { + if (typeof message.folderId === "number") + object.folderId = options.longs === String ? String(message.folderId) : message.folderId; + else + object.folderId = options.longs === String ? $util.Long.prototype.toString.call(message.folderId) : options.longs === Number ? new $util.LongBits(message.folderId.low >>> 0, message.folderId.high >>> 0).toNumber() : message.folderId; if (options.oneofs) - object.conditions = "cloudStorageConditions"; + object.location = "folderId"; } return object; }; /** - * Converts this DiscoveryFileStoreConditions to JSON. + * Converts this DiscoveryStartingLocation to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @instance * @returns {Object.} JSON object */ - DiscoveryFileStoreConditions.prototype.toJSON = function toJSON() { + DiscoveryStartingLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryFileStoreConditions + * Gets the default type url for DiscoveryStartingLocation * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryFileStoreConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DiscoveryStartingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryFileStoreConditions"; + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryStartingLocation"; }; - return DiscoveryFileStoreConditions; + return DiscoveryStartingLocation; })(); - v2.DiscoveryStartingLocation = (function() { + v2.OtherCloudDiscoveryStartingLocation = (function() { /** - * Properties of a DiscoveryStartingLocation. + * Properties of an OtherCloudDiscoveryStartingLocation. * @memberof google.privacy.dlp.v2 - * @interface IDiscoveryStartingLocation - * @property {number|Long|null} [organizationId] DiscoveryStartingLocation organizationId - * @property {number|Long|null} [folderId] DiscoveryStartingLocation folderId + * @interface IOtherCloudDiscoveryStartingLocation + * @property {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation|null} [awsLocation] OtherCloudDiscoveryStartingLocation awsLocation */ /** - * Constructs a new DiscoveryStartingLocation. + * Constructs a new OtherCloudDiscoveryStartingLocation. * @memberof google.privacy.dlp.v2 - * @classdesc Represents a DiscoveryStartingLocation. - * @implements IDiscoveryStartingLocation + * @classdesc Represents an OtherCloudDiscoveryStartingLocation. + * @implements IOtherCloudDiscoveryStartingLocation * @constructor - * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation=} [properties] Properties to set + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation=} [properties] Properties to set */ - function DiscoveryStartingLocation(properties) { + function OtherCloudDiscoveryStartingLocation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -62748,103 +66841,89 @@ } /** - * DiscoveryStartingLocation organizationId. - * @member {number|Long|null|undefined} organizationId - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation - * @instance - */ - DiscoveryStartingLocation.prototype.organizationId = null; - - /** - * DiscoveryStartingLocation folderId. - * @member {number|Long|null|undefined} folderId - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * OtherCloudDiscoveryStartingLocation awsLocation. + * @member {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation|null|undefined} awsLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @instance */ - DiscoveryStartingLocation.prototype.folderId = null; + OtherCloudDiscoveryStartingLocation.prototype.awsLocation = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; - /** - * DiscoveryStartingLocation location. - * @member {"organizationId"|"folderId"|undefined} location - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + /** + * OtherCloudDiscoveryStartingLocation location. + * @member {"awsLocation"|undefined} location + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @instance */ - Object.defineProperty(DiscoveryStartingLocation.prototype, "location", { - get: $util.oneOfGetter($oneOfFields = ["organizationId", "folderId"]), + Object.defineProperty(OtherCloudDiscoveryStartingLocation.prototype, "location", { + get: $util.oneOfGetter($oneOfFields = ["awsLocation"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new DiscoveryStartingLocation instance using the specified properties. + * Creates a new OtherCloudDiscoveryStartingLocation instance using the specified properties. * @function create - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static - * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation=} [properties] Properties to set - * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation instance + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} OtherCloudDiscoveryStartingLocation instance */ - DiscoveryStartingLocation.create = function create(properties) { - return new DiscoveryStartingLocation(properties); + OtherCloudDiscoveryStartingLocation.create = function create(properties) { + return new OtherCloudDiscoveryStartingLocation(properties); }; /** - * Encodes the specified DiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. + * Encodes the specified OtherCloudDiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify|verify} messages. * @function encode - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static - * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation} message DiscoveryStartingLocation message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation} message OtherCloudDiscoveryStartingLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryStartingLocation.encode = function encode(message, writer) { + OtherCloudDiscoveryStartingLocation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.organizationId); - if (message.folderId != null && Object.hasOwnProperty.call(message, "folderId")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.folderId); + if (message.awsLocation != null && Object.hasOwnProperty.call(message, "awsLocation")) + $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.encode(message.awsLocation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified DiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. + * Encodes the specified OtherCloudDiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify|verify} messages. * @function encodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static - * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation} message DiscoveryStartingLocation message or plain object to encode + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation} message OtherCloudDiscoveryStartingLocation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DiscoveryStartingLocation.encodeDelimited = function encodeDelimited(message, writer) { + OtherCloudDiscoveryStartingLocation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DiscoveryStartingLocation message from the specified reader or buffer. + * Decodes an OtherCloudDiscoveryStartingLocation message from the specified reader or buffer. * @function decode - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} OtherCloudDiscoveryStartingLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryStartingLocation.decode = function decode(reader, length) { + OtherCloudDiscoveryStartingLocation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryStartingLocation(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.organizationId = reader.int64(); - break; - } - case 2: { - message.folderId = reader.int64(); + message.awsLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.decode(reader, reader.uint32()); break; } default: @@ -62856,140 +66935,362 @@ }; /** - * Decodes a DiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * Decodes an OtherCloudDiscoveryStartingLocation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} OtherCloudDiscoveryStartingLocation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DiscoveryStartingLocation.decodeDelimited = function decodeDelimited(reader) { + OtherCloudDiscoveryStartingLocation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DiscoveryStartingLocation message. + * Verifies an OtherCloudDiscoveryStartingLocation message. * @function verify - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DiscoveryStartingLocation.verify = function verify(message) { + OtherCloudDiscoveryStartingLocation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.organizationId != null && message.hasOwnProperty("organizationId")) { - properties.location = 1; - if (!$util.isInteger(message.organizationId) && !(message.organizationId && $util.isInteger(message.organizationId.low) && $util.isInteger(message.organizationId.high))) - return "organizationId: integer|Long expected"; - } - if (message.folderId != null && message.hasOwnProperty("folderId")) { - if (properties.location === 1) - return "location: multiple values"; + if (message.awsLocation != null && message.hasOwnProperty("awsLocation")) { properties.location = 1; - if (!$util.isInteger(message.folderId) && !(message.folderId && $util.isInteger(message.folderId.low) && $util.isInteger(message.folderId.high))) - return "folderId: integer|Long expected"; + { + var error = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify(message.awsLocation); + if (error) + return "awsLocation." + error; + } } return null; }; /** - * Creates a DiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * Creates an OtherCloudDiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static * @param {Object.} object Plain object - * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} OtherCloudDiscoveryStartingLocation */ - DiscoveryStartingLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.privacy.dlp.v2.DiscoveryStartingLocation) + OtherCloudDiscoveryStartingLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation) return object; - var message = new $root.google.privacy.dlp.v2.DiscoveryStartingLocation(); - if (object.organizationId != null) - if ($util.Long) - (message.organizationId = $util.Long.fromValue(object.organizationId)).unsigned = false; - else if (typeof object.organizationId === "string") - message.organizationId = parseInt(object.organizationId, 10); - else if (typeof object.organizationId === "number") - message.organizationId = object.organizationId; - else if (typeof object.organizationId === "object") - message.organizationId = new $util.LongBits(object.organizationId.low >>> 0, object.organizationId.high >>> 0).toNumber(); - if (object.folderId != null) - if ($util.Long) - (message.folderId = $util.Long.fromValue(object.folderId)).unsigned = false; - else if (typeof object.folderId === "string") - message.folderId = parseInt(object.folderId, 10); - else if (typeof object.folderId === "number") - message.folderId = object.folderId; - else if (typeof object.folderId === "object") - message.folderId = new $util.LongBits(object.folderId.low >>> 0, object.folderId.high >>> 0).toNumber(); + var message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation(); + if (object.awsLocation != null) { + if (typeof object.awsLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.awsLocation: object expected"); + message.awsLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.fromObject(object.awsLocation); + } return message; }; /** - * Creates a plain object from a DiscoveryStartingLocation message. Also converts values to other types if specified. + * Creates a plain object from an OtherCloudDiscoveryStartingLocation message. Also converts values to other types if specified. * @function toObject - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static - * @param {google.privacy.dlp.v2.DiscoveryStartingLocation} message DiscoveryStartingLocation + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} message OtherCloudDiscoveryStartingLocation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DiscoveryStartingLocation.toObject = function toObject(message, options) { + OtherCloudDiscoveryStartingLocation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.organizationId != null && message.hasOwnProperty("organizationId")) { - if (typeof message.organizationId === "number") - object.organizationId = options.longs === String ? String(message.organizationId) : message.organizationId; - else - object.organizationId = options.longs === String ? $util.Long.prototype.toString.call(message.organizationId) : options.longs === Number ? new $util.LongBits(message.organizationId.low >>> 0, message.organizationId.high >>> 0).toNumber() : message.organizationId; - if (options.oneofs) - object.location = "organizationId"; - } - if (message.folderId != null && message.hasOwnProperty("folderId")) { - if (typeof message.folderId === "number") - object.folderId = options.longs === String ? String(message.folderId) : message.folderId; - else - object.folderId = options.longs === String ? $util.Long.prototype.toString.call(message.folderId) : options.longs === Number ? new $util.LongBits(message.folderId.low >>> 0, message.folderId.high >>> 0).toNumber() : message.folderId; + if (message.awsLocation != null && message.hasOwnProperty("awsLocation")) { + object.awsLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.toObject(message.awsLocation, options); if (options.oneofs) - object.location = "folderId"; + object.location = "awsLocation"; } return object; }; /** - * Converts this DiscoveryStartingLocation to JSON. + * Converts this OtherCloudDiscoveryStartingLocation to JSON. * @function toJSON - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @instance * @returns {Object.} JSON object */ - DiscoveryStartingLocation.prototype.toJSON = function toJSON() { + OtherCloudDiscoveryStartingLocation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DiscoveryStartingLocation + * Gets the default type url for OtherCloudDiscoveryStartingLocation * @function getTypeUrl - * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DiscoveryStartingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OtherCloudDiscoveryStartingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryStartingLocation"; + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation"; }; - return DiscoveryStartingLocation; + OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation = (function() { + + /** + * Properties of an AwsDiscoveryStartingLocation. + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @interface IAwsDiscoveryStartingLocation + * @property {string|null} [accountId] AwsDiscoveryStartingLocation accountId + * @property {boolean|null} [allAssetInventoryAssets] AwsDiscoveryStartingLocation allAssetInventoryAssets + */ + + /** + * Constructs a new AwsDiscoveryStartingLocation. + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @classdesc Represents an AwsDiscoveryStartingLocation. + * @implements IAwsDiscoveryStartingLocation + * @constructor + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation=} [properties] Properties to set + */ + function AwsDiscoveryStartingLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsDiscoveryStartingLocation accountId. + * @member {string|null|undefined} accountId + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @instance + */ + AwsDiscoveryStartingLocation.prototype.accountId = null; + + /** + * AwsDiscoveryStartingLocation allAssetInventoryAssets. + * @member {boolean|null|undefined} allAssetInventoryAssets + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @instance + */ + AwsDiscoveryStartingLocation.prototype.allAssetInventoryAssets = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AwsDiscoveryStartingLocation scope. + * @member {"accountId"|"allAssetInventoryAssets"|undefined} scope + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @instance + */ + Object.defineProperty(AwsDiscoveryStartingLocation.prototype, "scope", { + get: $util.oneOfGetter($oneOfFields = ["accountId", "allAssetInventoryAssets"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AwsDiscoveryStartingLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} AwsDiscoveryStartingLocation instance + */ + AwsDiscoveryStartingLocation.create = function create(properties) { + return new AwsDiscoveryStartingLocation(properties); + }; + + /** + * Encodes the specified AwsDiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation} message AwsDiscoveryStartingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsDiscoveryStartingLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accountId); + if (message.allAssetInventoryAssets != null && Object.hasOwnProperty.call(message, "allAssetInventoryAssets")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allAssetInventoryAssets); + return writer; + }; + + /** + * Encodes the specified AwsDiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation} message AwsDiscoveryStartingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsDiscoveryStartingLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsDiscoveryStartingLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} AwsDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsDiscoveryStartingLocation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.accountId = reader.string(); + break; + } + case 3: { + message.allAssetInventoryAssets = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AwsDiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} AwsDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsDiscoveryStartingLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsDiscoveryStartingLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsDiscoveryStartingLocation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.accountId != null && message.hasOwnProperty("accountId")) { + properties.scope = 1; + if (!$util.isString(message.accountId)) + return "accountId: string expected"; + } + if (message.allAssetInventoryAssets != null && message.hasOwnProperty("allAssetInventoryAssets")) { + if (properties.scope === 1) + return "scope: multiple values"; + properties.scope = 1; + if (typeof message.allAssetInventoryAssets !== "boolean") + return "allAssetInventoryAssets: boolean expected"; + } + return null; + }; + + /** + * Creates an AwsDiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} AwsDiscoveryStartingLocation + */ + AwsDiscoveryStartingLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation) + return object; + var message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation(); + if (object.accountId != null) + message.accountId = String(object.accountId); + if (object.allAssetInventoryAssets != null) + message.allAssetInventoryAssets = Boolean(object.allAssetInventoryAssets); + return message; + }; + + /** + * Creates a plain object from an AwsDiscoveryStartingLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} message AwsDiscoveryStartingLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsDiscoveryStartingLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.accountId != null && message.hasOwnProperty("accountId")) { + object.accountId = message.accountId; + if (options.oneofs) + object.scope = "accountId"; + } + if (message.allAssetInventoryAssets != null && message.hasOwnProperty("allAssetInventoryAssets")) { + object.allAssetInventoryAssets = message.allAssetInventoryAssets; + if (options.oneofs) + object.scope = "allAssetInventoryAssets"; + } + return object; + }; + + /** + * Converts this AwsDiscoveryStartingLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @instance + * @returns {Object.} JSON object + */ + AwsDiscoveryStartingLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsDiscoveryStartingLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsDiscoveryStartingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation"; + }; + + return AwsDiscoveryStartingLocation; + })(); + + return OtherCloudDiscoveryStartingLocation; })(); v2.AllOtherResources = (function() { diff --git a/packages/google-privacy-dlp/protos/protos.json b/packages/google-privacy-dlp/protos/protos.json index a8e9e790f7e..1401f03d239 100644 --- a/packages/google-privacy-dlp/protos/protos.json +++ b/packages/google-privacy-dlp/protos/protos.json @@ -4963,6 +4963,8 @@ "oneof": [ "exportData", "pubSubNotification", + "publishToChronicle", + "publishToScc", "tagResources" ] } @@ -4976,6 +4978,14 @@ "type": "PubSubNotification", "id": 2 }, + "publishToChronicle": { + "type": "PublishToChronicle", + "id": 3 + }, + "publishToScc": { + "type": "PublishToSecurityCommandCenter", + "id": 4 + }, "tagResources": { "type": "TagResources", "id": 8 @@ -5029,6 +5039,12 @@ "ERROR_CHANGED": 4 } }, + "PublishToChronicle": { + "fields": {} + }, + "PublishToSecurityCommandCenter": { + "fields": {} + }, "TagResources": { "fields": { "tagConditions": { @@ -5095,6 +5111,10 @@ "type": "string", "id": 5 }, + "otherCloudStartingLocation": { + "type": "OtherCloudDiscoveryStartingLocation", + "id": 8 + }, "inspectTemplates": { "rule": "repeated", "type": "string", @@ -5204,6 +5224,10 @@ "type": "OrgConfig", "id": 2 }, + "otherCloudStartingLocation": { + "type": "OtherCloudDiscoveryStartingLocation", + "id": 12 + }, "inspectTemplates": { "rule": "repeated", "type": "string", @@ -5285,7 +5309,8 @@ "bigQueryTarget", "cloudSqlTarget", "secretsTarget", - "cloudStorageTarget" + "cloudStorageTarget", + "otherCloudTarget" ] } }, @@ -5305,6 +5330,10 @@ "cloudStorageTarget": { "type": "CloudStorageDiscoveryTarget", "id": 4 + }, + "otherCloudTarget": { + "type": "OtherCloudDiscoveryTarget", + "id": 5 } } }, @@ -5956,6 +5985,257 @@ } } }, + "OtherCloudDiscoveryTarget": { + "oneofs": { + "cadence": { + "oneof": [ + "generationCadence", + "disabled" + ] + } + }, + "fields": { + "dataSourceType": { + "type": "DataSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "filter": { + "type": "DiscoveryOtherCloudFilter", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conditions": { + "type": "DiscoveryOtherCloudConditions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "generationCadence": { + "type": "DiscoveryOtherCloudGenerationCadence", + "id": 4 + }, + "disabled": { + "type": "Disabled", + "id": 5 + } + } + }, + "DiscoveryOtherCloudFilter": { + "oneofs": { + "filter": { + "oneof": [ + "collection", + "singleResource", + "others" + ] + } + }, + "fields": { + "collection": { + "type": "OtherCloudResourceCollection", + "id": 1 + }, + "singleResource": { + "type": "OtherCloudSingleResourceReference", + "id": 2 + }, + "others": { + "type": "AllOtherResources", + "id": 100, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OtherCloudResourceCollection": { + "oneofs": { + "pattern": { + "oneof": [ + "includeRegexes" + ] + } + }, + "fields": { + "includeRegexes": { + "type": "OtherCloudResourceRegexes", + "id": 1 + } + } + }, + "OtherCloudResourceRegexes": { + "fields": { + "patterns": { + "rule": "repeated", + "type": "OtherCloudResourceRegex", + "id": 1 + } + } + }, + "OtherCloudResourceRegex": { + "oneofs": { + "resourceRegex": { + "oneof": [ + "amazonS3BucketRegex" + ] + } + }, + "fields": { + "amazonS3BucketRegex": { + "type": "AmazonS3BucketRegex", + "id": 1 + } + } + }, + "AwsAccountRegex": { + "fields": { + "accountIdRegex": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AmazonS3BucketRegex": { + "fields": { + "awsAccountRegex": { + "type": "AwsAccountRegex", + "id": 1 + }, + "bucketNameRegex": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OtherCloudSingleResourceReference": { + "oneofs": { + "resource": { + "oneof": [ + "amazonS3Bucket" + ] + } + }, + "fields": { + "amazonS3Bucket": { + "type": "AmazonS3Bucket", + "id": 1 + } + } + }, + "AwsAccount": { + "fields": { + "accountId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AmazonS3Bucket": { + "fields": { + "awsAccount": { + "type": "AwsAccount", + "id": 1 + }, + "bucketName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DiscoveryOtherCloudConditions": { + "oneofs": { + "conditions": { + "oneof": [ + "amazonS3BucketConditions" + ] + } + }, + "fields": { + "minAge": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "amazonS3BucketConditions": { + "type": "AmazonS3BucketConditions", + "id": 2 + } + } + }, + "AmazonS3BucketConditions": { + "fields": { + "bucketTypes": { + "rule": "repeated", + "type": "BucketType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "objectStorageClasses": { + "rule": "repeated", + "type": "ObjectStorageClass", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "BucketType": { + "values": { + "TYPE_UNSPECIFIED": 0, + "TYPE_ALL_SUPPORTED": 1, + "TYPE_GENERAL_PURPOSE": 2 + } + }, + "ObjectStorageClass": { + "values": { + "UNSPECIFIED": 0, + "ALL_SUPPORTED_CLASSES": 1, + "STANDARD": 2, + "STANDARD_INFREQUENT_ACCESS": 4, + "GLACIER_INSTANT_RETRIEVAL": 6, + "INTELLIGENT_TIERING": 7 + } + } + } + }, + "DiscoveryOtherCloudGenerationCadence": { + "fields": { + "refreshFrequency": { + "type": "DataProfileUpdateFrequency", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inspectTemplateModifiedCadence": { + "type": "DiscoveryInspectTemplateModifiedCadence", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, "DiscoveryStartingLocation": { "oneofs": { "location": { @@ -5976,6 +6256,43 @@ } } }, + "OtherCloudDiscoveryStartingLocation": { + "oneofs": { + "location": { + "oneof": [ + "awsLocation" + ] + } + }, + "fields": { + "awsLocation": { + "type": "AwsDiscoveryStartingLocation", + "id": 1 + } + }, + "nested": { + "AwsDiscoveryStartingLocation": { + "oneofs": { + "scope": { + "oneof": [ + "accountId", + "allAssetInventoryAssets" + ] + } + }, + "fields": { + "accountId": { + "type": "string", + "id": 2 + }, + "allAssetInventoryAssets": { + "type": "bool", + "id": 3 + } + } + } + } + }, "AllOtherResources": { "fields": {} }, diff --git a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_file_store_data_profiles.js b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_file_store_data_profiles.js index 85859e9cd08..43fa241459e 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_file_store_data_profiles.js +++ b/packages/google-privacy-dlp/samples/generated/v2/dlp_service.list_file_store_data_profiles.js @@ -73,6 +73,7 @@ function main(parent) { * * A restriction has the form of `{field} {operator} {value}`. * * Supported fields/values: * - `project_id` - The Google Cloud project ID. + * - `account_id` - The AWS account ID. * - `file_store_path` - The path like "gs://bucket". * - `data_source_type` - The profile's data source type, like * "google/storage/bucket". diff --git a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json index 9074f79cd29..1f31ec1d521 100644 --- a/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json +++ b/packages/google-privacy-dlp/samples/generated/v2/snippet_metadata_google.privacy.dlp.v2.json @@ -2030,7 +2030,7 @@ "segments": [ { "start": 25, - "end": 115, + "end": 116, "type": "FULL" } ], 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 d085dd695f7..c18961a6a41 100644 --- a/packages/google-privacy-dlp/src/v2/dlp_service_client.ts +++ b/packages/google-privacy-dlp/src/v2/dlp_service_client.ts @@ -7849,6 +7849,7 @@ export class DlpServiceClient { * * A restriction has the form of `{field} {operator} {value}`. * * Supported fields/values: * - `project_id` - The Google Cloud project ID. + * - `account_id` - The AWS account ID. * - `file_store_path` - The path like "gs://bucket". * - `data_source_type` - The profile's data source type, like * "google/storage/bucket". @@ -8007,6 +8008,7 @@ export class DlpServiceClient { * * A restriction has the form of `{field} {operator} {value}`. * * Supported fields/values: * - `project_id` - The Google Cloud project ID. + * - `account_id` - The AWS account ID. * - `file_store_path` - The path like "gs://bucket". * - `data_source_type` - The profile's data source type, like * "google/storage/bucket". @@ -8109,6 +8111,7 @@ export class DlpServiceClient { * * A restriction has the form of `{field} {operator} {value}`. * * Supported fields/values: * - `project_id` - The Google Cloud project ID. + * - `account_id` - The AWS account ID. * - `file_store_path` - The path like "gs://bucket". * - `data_source_type` - The profile's data source type, like * "google/storage/bucket".